Eq. (4): the chi-squared statistic is nonnegative
ProvedSZFilaments.chiSquared_nonnegEquation (4) of the paper: the chi-squared statistic is nonnegative.
For a mean profile with bins and a covariance matrix that is positive definite, the statistic of Eq. (4),
satisfies . The hypothesis is positive definiteness of — not merely of — which is the condition under which the inverse exists and is itself positive definite; without it the nonsingular inverse may be the zero matrix or indefinite and the quadratic form carries no sign.
import Definitions.Def_szStackStatistics open Finset Matrix
namespace SZFilaments
theorem chiSquared_nonneg {n : ℕ} (C : Matrix (Fin n) (Fin n) ℝ) (hC : C.PosDef)
(ybar : Fin n → ℝ) : 0 ≤ chiSquared C ybar := by sorry
end SZFilaments
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Disclosure — this read-back is not blind and not independent. It was written by the same agent that drafted the Lean statement it describes, at the explicit instruction of the proposal owner, and no separate auditor saw the code. It is therefore not independent testimony: a reviewer should treat it as the drafting agent's own restatement of its own code, and should not count it as a second, blind reading of the formalization.
For an arbitrary natural number , an arbitrary real matrix assumed positive definite (symmetric with for every nonzero ), and an arbitrary real vector indexed by the bins, the statement asserts
where is the nonsingular matrix inverse.
The inequality is non-strict, and nothing asserts positivity: for the sum is , which satisfies the claim. The hypothesis is on , not on , and is satisfiable (for instance by the identity), so the statement is not vacuous; for the empty sum is and the claim holds trivially. No connection is asserted between and any data set or covariance estimator: is an arbitrary vector.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.