Documentation

CslibFrontier.Foundations.Data.Matrix.Permanent.Blocks

Reindexing, multilinearity and block identities for the permanent #

The permanent is unchanged by independent row and column reindexing, commutes with ring and algebra homomorphisms, and is additive in each row and column. On a block triangular matrix with square diagonal blocks, it is the product of their permanents. These identities work over every commutative semiring, including empty index types.

Main results #

References #

The block proof adapts Mathlib's Matrix.det_fromBlocks_zero₂₁ in Mathlib/LinearAlgebra/Matrix/Determinant/Basic.lean, retaining its authors' credit. Other proof material is adapted from the saved Complexitylib development at revision 5b8acca7.

@[simp]
theorem Matrix.permanent_submatrix_equiv {m : Type u_1} [Fintype m] [DecidableEq m] {R : Type u_3} [CommSemiring R] {m' : Type u_4} [Fintype m'] [DecidableEq m'] (e : m' ≃ m) (A : Matrix m m R) :
(A.submatrix ⇑e ⇑e).permanent = A.permanent

Reindexing both rows and columns of a square matrix by the same equivalence preserves its permanent.

theorem Matrix.permanent_submatrix_equiv_equiv {m : Type u_1} [Fintype m] [DecidableEq m] {R : Type u_3} [CommSemiring R] {m' : Type u_4} [Fintype m'] [DecidableEq m'] (e₁ e₂ : m' ≃ m) (A : Matrix m m R) :
(A.submatrix ⇑e₁ ⇑e₂).permanent = A.permanent

Reindexing the rows and columns of a square matrix by any two equivalences preserves its permanent.

@[simp]
theorem Matrix.permanent_updateCol_add {m : Type u_1} [Fintype m] [DecidableEq m] {R : Type u_3} [CommSemiring R] (M : Matrix m m R) (j : m) (u v : m → R) :

Multilinearity of the permanent in a column.

@[simp]
theorem Matrix.permanent_updateRow_add {m : Type u_1} [Fintype m] [DecidableEq m] {R : Type u_3} [CommSemiring R] (M : Matrix m m R) (i : m) (u v : m → R) :

Multilinearity of the permanent in a row.

theorem Matrix.permanent_add_of_row_eq {m : Type u_1} [Fintype m] [DecidableEq m] {R : Type u_3} [CommSemiring R] (M M₁ M₂ : Matrix m m R) (r : m) (hr : ∀ (j : m), M r j = M₁ r j + M₂ r j) (h₁ : ∀ (i : m), i ≠ r → ∀ (j : m), M₁ i j = M i j) (h₂ : ∀ (i : m), i ≠ r → ∀ (j : m), M₂ i j = M i j) :

If two matrices M₁, M₂ agree with M outside row r and their r-th rows sum to row r of M, then M.permanent = M₁.permanent + M₂.permanent.

theorem RingHom.map_permanent {m : Type u_1} [Fintype m] [DecidableEq m] {R : Type u_3} [CommSemiring R] {S : Type u_4} [CommSemiring S] (f : R →+* S) (M : Matrix m m R) :
f M.permanent = (M.map ⇑f).permanent

Applying a ring homomorphism to the permanent of a matrix is the permanent of the mapped matrix.

theorem AlgHom.map_permanent {m : Type u_1} [Fintype m] [DecidableEq m] {R₀ : Type u_4} {A : Type u_5} {B : Type u_6} [CommSemiring R₀] [CommSemiring A] [CommSemiring B] [Algebra R₀ A] [Algebra R₀ B] (f : A →ₐ[R₀] B) (M : Matrix m m A) :
f M.permanent = (M.map ⇑f).permanent

Applying an algebra homomorphism to the permanent of a matrix is the permanent of the mapped matrix.

@[simp]
theorem Matrix.permanent_fromBlocks_zero₂₁ {m : Type u_1} {n : Type u_2} [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] {R : Type u_3} [CommSemiring R] (A : Matrix m m R) (B : Matrix m n R) (D : Matrix n n R) :

The permanent of a 2 × 2 block matrix with the lower-left block equal to zero is the product of the permanents of the diagonal blocks.

@[simp]
theorem Matrix.permanent_fromBlocks_zero₁₂ {m : Type u_1} {n : Type u_2} [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] {R : Type u_3} [CommSemiring R] (A : Matrix m m R) (C : Matrix n m R) (D : Matrix n n R) :

The permanent of a 2 × 2 block matrix with the upper-right block equal to zero is the product of the permanents of the diagonal blocks.

theorem Matrix.permanent_fromBlocks_zero {m : Type u_1} {n : Type u_2} [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] {R : Type u_3} [CommSemiring R] (A : Matrix m m R) (D : Matrix n n R) :

The permanent of a block-diagonal 2 × 2 matrix is the product of the permanents of its diagonal blocks.