Documentation

CslibFrontier.Foundations.LinearAlgebra.Matrix.GrenetPermanent

Grenet's determinantal representation of the permanent #

The permanent of an n × n matrix A over a commutative ring is the determinant of a (2ⁿ - 1) × (2ⁿ - 1) matrix grenetMatrix A whose entries are entries of A, 0 or -1 Grenet.

Grenet's construction starts from an algebraic branching program on the subsets of {0, …, n - 1}, with source ∅ and sink the whole set. For j ∉ S, an arc goes from S to insert j S with weight A #S j, an entry of row #S. A path from ∅ to the whole set adds the columns one at a time, row by row, so it reads off a permutation σ with weight ∏ k, A k (σ k). The value of the program is the permanent. The colex order on the subsets numbers the vertices in topological order, because a proper subset comes earlier in colex. The step from the branching program to the determinant is Matrix.eq_det_submatrix_sub_one_of_eq_single_add_vecMul. That step deletes the row of the sink and the column of the source from N - 1, where N is the weighted adjacency matrix. Grenet instead merges the source and the sink, puts loops of weight 1 on the other vertices, and fixes the sign for even n by giving weight -1 to the loops of the first layer. Here every vertex other than the merged source and sink carries -1 on the diagonal, and the adjugate formula absorbs the sign, so no parity case split is needed. This is Grenet's construction with a different sign normalization.

Grenet states the result over fields of characteristic other than two; in characteristic two the permanent is the determinant. The identity Matrix.permanent_eq_det_grenetMatrix holds over every commutative ring.

Main definitions #

Main results #

References #

noncomputable def Matrix.grenetMatrix {R : Type u_1} [CommRing R] {n : ℕ} (A : Matrix (Fin n) (Fin n) R) :
Matrix (Fin (2 ^ n - 1)) (Fin (2 ^ n - 1)) R

Grenet's matrix of an n × n matrix A Grenet. Number the subsets of {0, …, n - 1} in colex order, from ∅ to the whole set. Rows are indexed by all subsets but the whole set, columns by all subsets but ∅. The entry at (S, T) is A #S j if T = insert j S with j ∉ S, -1 if S = T, and 0 otherwise. Its determinant is the permanent of A (Matrix.permanent_eq_det_grenetMatrix).

theorem Matrix.permanent_eq_det_grenetMatrix {R : Type u_1} [CommRing R] {n : ℕ} (A : Matrix (Fin n) (Fin n) R) :

Grenet's theorem Grenet: the permanent of an n × n matrix over a commutative ring is the determinant of a (2ⁿ - 1) × (2ⁿ - 1) matrix whose entries are entries of A, 0 or -1 (Matrix.grenetMatrix_apply_eq). Grenet states it over fields of characteristic other than two; the identity holds over every commutative ring.

theorem Matrix.grenetMatrix_apply_eq {R : Type u_1} [CommRing R] {n : ℕ} (A : Matrix (Fin n) (Fin n) R) (a b : Fin (2 ^ n - 1)) :
(∃ (i : Fin n) (j : Fin n), A.grenetMatrix a b = A i j) ∨ A.grenetMatrix a b = 0 ∨ A.grenetMatrix a b = -1

Every entry of Grenet's matrix is an entry of A, 0 or -1.