Total nonnegativity #
A real matrix is totally nonnegative when every square minor formed by
strictly increasing index maps is nonnegative. The empty (k = 0) minor is
the determinant of a Matrix (Fin 0) (Fin 0), which Mathlib sets to 1.
Cauchy–Binet is proved only for a product with middle dimension 3, by
enumerating the C(3, r) strictly increasing maps Fin r → Fin 3
(r = 0,1,2,3) and using rank for r > 3.
TN01: definition #
A matrix is totally nonnegative if every square minor with strictly
increasing row and column index maps has nonnegative determinant. The
k = 0 case is included: Matrix.det_fin_zero says the empty minor equals
1.
Equations
- BollobasNikiforov.IsTotallyNonneg A = ∀ (k : ℕ) (I : Fin k → m) (J : Fin k → n), StrictMono I → StrictMono J → 0 ≤ (A.submatrix I J).det
Instances For
TN02: size-one minors and nondecreasing index maps #
A monotone injective map out of a linear order is strictly increasing.
Totally nonnegative matrices are entrywise nonnegative (the k = 1
minors).
If A is totally nonnegative and I, J are merely nondecreasing, the
corresponding minor is still nonnegative: a repeated index forces determinant
0 when k ≥ 2, and an injective monotone map is strictly increasing.
TN03: Cauchy–Binet of width 3 #
The three strictly increasing maps Fin 2 → Fin 3 are Fin.succAbove k
for k : Fin 3 (skip one of {0,1,2}).
Equations
Instances For
Square minors of size greater than 3 of a product X * Yᵀ vanish,
since the factors have only three columns (rank at most 3).
Cauchy–Binet for a product of two three-column real matrices. The sum
runs over the strictly increasing maps Fin r → Fin 3 (equivalently, the
C(3, r) increasing embeddings, enumerated as the unique empty map, the
three constants, Fin.succAbove, and id). For r > 3 both sides are
zero.
TN04: product of two 3-column TN matrices #
The product X * Yᵀ of two three-column totally nonnegative matrices is
totally nonnegative. Size r > 3 minors vanish by rank; smaller minors are
nonnegative sums of products of TN minors via Cauchy–Binet.