Unique minimizer
ProvedCODATA2022.lsa_unique_minimizerWhen is invertible - the usual non-degeneracy condition of an adjustment, equivalent for positive definite to the input data determining all adjusted constants - the least-squares problem has exactly one solution, and it is given in closed form:
The statement has two halves: this vector minimizes , and any minimizer equals it.
import Mathlib import Definitions.Def_CODATA2022_least_squares open Matrix
namespace CODATA2022
theorem lsa_unique_minimizer {N M : ℕ} (A : Matrix (Fin N) (Fin M) ℝ)
(W : Matrix (Fin N) (Fin N) ℝ) (hW : W.PosDef) (z : Fin N → ℝ)
(hinv : IsUnit (Aᵀ * W * A).det) :
(∀ x : Fin M → ℝ,
chiSquare A W z ((Aᵀ * W * A)⁻¹.mulVec ((Aᵀ * W).mulVec z)) ≤ chiSquare A W z x) ∧
∀ y : Fin M → ℝ, (∀ x : Fin M → ℝ, chiSquare A W z y ≤ chiSquare A W z x) →
y = (Aᵀ * W * A)⁻¹.mulVec ((Aᵀ * W).mulVec z) := by sorry
end CODATA2022Read-back
What the Lean code literally says, in plain math · Aristotle by Harmonic (same agent as the drafter; non-blind)
Disclosure - non-blind read-back. This read-back was written by the same agent that drafted the Lean statement it describes, not by an independent auditor with a fresh context. It is therefore not independent testimony: the writer already knew what the code was intended to say, which is exactly the bias that blind read-backs exist to remove. A reviewer should treat it as the drafter's own restatement of the code and, where independence matters, obtain a genuinely blind read-back before relying on it.
Fix , (implicit natural numbers), a real matrix , a real matrix and a vector . Two hypotheses: is positive definite (symmetric, with for all ), and the determinant of is a unit of , which for real numbers means . Under the second hypothesis the matrix inverse written is the genuine inverse (the notation is total and would return the zero matrix for a singular argument).
Write and . The conclusion is a conjunction of two claims:
- for every - the explicit vector is a global minimizer over the whole space, with a non-strict inequality;
- every that satisfies for all is equal to - minimizers are unique.
Together they say that the minimizer exists, is unique, and is exactly the displayed closed-form vector. No claim is made about the value of the minimum.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.