Skip to content

Total nonnegativity is closed under products (via Cauchy–Binet) - #403

Merged
PerAlexandersson merged 1 commit into
mainfrom
proof/tn-mul-cauchy-binet
Aug 21, 2026
Merged

Total nonnegativity is closed under products (via Cauchy–Binet)#403
PerAlexandersson merged 1 commit into
mainfrom
proof/tn-mul-cauchy-binet

Conversation

@PerAlexandersson

Copy link
Copy Markdown
Owner

Step 2 of #394's decomposition. Adds, in the Mathlib mirror tree so it is upstream-shaped:

protectedtheoremMatrix.IsTotallyNonnegRect.mul (hL : L.IsTotallyNonnegRect)
(hA : A.IsTotallyNonnegRect) : (L * A).IsTotallyNonnegRect
protectedtheoremMatrix.IsTotallyNonneg.mul (hL : L.IsTotallyNonneg)
(hA : A.IsTotallyNonneg) : (L * A).IsTotallyNonneg

No sorry, no axiom; full RealRooted target builds with zero warnings (9002 jobs).

It was four lines, because Cauchy–Binet was already here

Matrix.det_submatrix_mul_eq_sum_powersetCard (Determinant/CauchyBinet.lean, sorry-free) expands a minor of a product as a sum over intermediate column sets. Each intermediate selection is Set.powersetCard.ofFinEmbEquiv.symm s, an OrderEmbedding, hence strictly monotone — so every summand is a product of two nonnegative minors and Finset.sum_nonneg finishes.

This corrects the assessment in #394, which said Mathlib lacks Cauchy–Binet and treated it as work to be done. That is true of Mathlib but not of this repo, which already had it. Only checking Mathlib was an oversight.

File placement

It sits in Mathlib/LinearAlgebra/Matrix/TotallyNonneg/Mul.lean rather than being appended to TotallyNonneg.lean for one mechanical reason: TotallyNonneg.lean is a module (with public import) while Determinant/CauchyBinet.lean is not, and a module cannot import a non-module. Converting either file was the more invasive option. The header records that the two belong together when upstreaming.

🤖 Generated with Claude Code

Adds Matrix.IsTotallyNonnegRect.mul and Matrix.IsTotallyNonneg.mul in the
Mathlib mirror tree, so they are upstream-shaped.
The proof is four lines: the existing
Matrix.det_submatrix_mul_eq_sum_powersetCard expands a minor of a product as a
sum over intermediate column sets, each intermediate selection is the increasing
enumeration of a subset and so strictly monotone, hence every summand is a
product of two nonnegative minors.
This is step 2 of the decomposition recorded in issue #394, and it turned out to
be immediate because Cauchy-Binet was already present and sorry-free in this
repo (Determinant/CauchyBinet.lean), contrary to the earlier assessment there
which only checked Mathlib.
Placed in its own file rather than appended to
Mathlib/LinearAlgebra/Matrix/TotallyNonneg.lean purely because that file is a
`module` while Determinant/CauchyBinet.lean is not, and a `module` cannot import
a non-`module`; the file header records that they belong together when
upstreaming.
No sorry and no axiom; the full RealRooted target builds with zero warnings.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@PerAlexandersson