NLA-lib Explorer

Multiplicativity of compound matrices

Library · Result group

Theorem (Matrix.compound_mul). Multiplicativity of compound matrices. Writing C_k(\mathbf{A}) for the k-th compound matrix (compound k A), C_k(\mathbf{A}\mathbf{B}) = C_k(\mathbf{A}) C_k(\mathbf{B}), the Cauchy–Binet formula for every k \times k minor of a product. [HornJohnson2013, §0.8.1 and §0.8.7].

Headline (provisional)

Lean statement and details
Matrix.compound_mul.{u_1, u_2, u_3, u_4} {R : Type u_1} [CommRing R] {l : Type u_2} {m : Type u_3}
  {n : Type u_4} [LinearOrder l] [LinearOrder m] [LinearOrder n] [Fintype m] (k : ℕ)
  (A : Matrix l m R) (B : Matrix m n R) : compound k (A * B) = compound k A * compound k B

Full source on GitHub

Copy link

Other forms

Theorem (Matrix.det_conjTranspose_mul_self_eq_sum_powersetCard). Cauchy–Binet formula for Gram determinants. A Gram determinant is the sum of the Gram determinants of the maximal row selections: \det(\mathbf{A}^{\mathsf{H}}\mathbf{A}) = \sum_s \det(\mathbf{A}_{s,:}^{\mathsf{H}} \mathbf{A}_{s,:}), over the sets s of rows with as many elements as \mathbf{A} has columns. Over \mathbb{R} or \mathbb{C} each term is the squared absolute value of a maximal minor. [HornJohnson2013, §0.8.7].

General form: sizes are index types

Lean statement and details
Matrix.det_conjTranspose_mul_self_eq_sum_powersetCard.{u_1, u_3, u_4} {R : Type u_1} [CommRing R]
  {m : Type u_3} {n : Type u_4} [Fintype m] [Fintype n] [StarRing R] [DecidableEq n]
  (A : Matrix m n R) :
  (Aᴴ * A).det =
    ∑ s ∈ Finset.powersetCard (Fintype.card n) Finset.univ,
      ((A.submatrix Subtype.val id)ᴴ * A.submatrix Subtype.val id).det

Full source on GitHub

Copy link

Theorem (Matrix.det_mul_eq_sum_powersetCard). The Cauchy–Binet formula. For \mathbf{A} of size m \times n and \mathbf{B} of size n \times m, \det(\mathbf{A}\mathbf{B}) = \sum_{s \subseteq n,\ \lvert s \rvert = \lvert m \rvert} \det(\mathbf{A}_{:,s} \mathbf{B}_{s,:}) \,, the sum over the subsets s of the middle index with as many elements as m, of the determinant of the product of the columns s of \mathbf{A} with the rows s of \mathbf{B}. When n has fewer elements than m the sum is empty and the determinant is zero. [HornJohnson2013, §0.8.7]; stated there with each term as a product of two minors, which is Matrix.det_mul_eq_det_submatrix_mul_det_submatrix applied to an enumeration of s. Here over any commutative ring and any finite index types.

General form: sizes are index types

Lean statement and details
Matrix.det_mul_eq_sum_powersetCard.{u_1, u_3, u_4} {R : Type u_1} [CommRing R] {m : Type u_3}
  {n : Type u_4} [Fintype m] [Fintype n] [DecidableEq m] (A : Matrix m n R) (B : Matrix n m R) :
  (A * B).det =
    ∑ s ∈ Finset.powersetCard (Fintype.card m) Finset.univ,
      (A.submatrix id Subtype.val * B.submatrix Subtype.val id).det

Full source on GitHub

Copy link

General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.