Matrix.det_mul_eq_sum_powersetCard
Library · theorem
General form: sizes are index types
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. Result: cauchy-binet
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).detImport NLAlib.ForMathlib.LinearAlgebra.Matrix.CauchyBinet.
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.