Theorem 5:2, first sentence — the cg-method is a cd-method
ProvedConjGrad.Termination.cg_isCDRunLet be a real symmetric positive definite matrix and let . The estimates , residuals and directions produced by the conjugate gradient method (3:1) started at form a run of the method of conjugate directions for : for all ,
- ;
- with ;
- for .
In the paper's words: the cg-method is a cd-method. Together with Theorem 4:2 this yields the finite termination of the cg-method.
Formalization Note Only the first sentence of Theorem 5:2 is formalized. The second sentence (the are obtained by -orthogonalization of the residuals) and the converse ("a cd-method in which the residuals are mutually orthogonal is essentially a cg-method", which the paper qualifies by an informal continuity assumption) are not part of this statement.
import Mathlib import Definitions.Def_ConjGrad_Termination_cgIter import Definitions.Def_ConjGrad_Termination_IsCDRun open Matrix
namespace ConjGrad.Termination
/-- Theorem 5:2, first sentence (Hestenes–Stiefel 1952, p. 415): the cg-method is a
cd-method. For a symmetric positive definite `A`, the estimates, residuals and directions
produced by the cg-method (3:1) form a run of the cd-method (4:1)–(4:2): `rᵢ = k − Axᵢ`,
`xᵢ₊₁ = xᵢ + ((pᵢ,rᵢ)/(pᵢ,Apᵢ)) pᵢ`, and each `pᵢ₊₁` is conjugate to `p₀, …, pᵢ`. -/
theorem cg_isCDRun {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (hA : A.PosDef)
(k x₀ : Fin n → ℝ) :
IsCDRun A k (fun i => (cgIter A k x₀ i).x) (fun i => (cgIter A k x₀ i).r)
(fun i => (cgIter A k x₀ i).p) := by sorry
end ConjGrad.Termination
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let and let be a real matrix that is positive definite in this sense:
- is symmetric, ;
- for every nonzero .
Here . Let be arbitrary.
The iteration. Let be the sequence defined recursively as follows. Start with
Then, for every ,
Every quotient with a zero denominator is , and the recursion never stops. Only is defined as ; later residuals come from the recursive update.
Conclusion. The three sequences satisfy all of the following:
- For every ,
- For every ,
with the quotient read as when . 3. For every and every ,
Degenerate cases.
- Unbounded indices. All indices range over all natural numbers, including those beyond .
- . Every vector is empty and all three conditions hold trivially.
- . Then and for all , so conditions 2 and 3 read and .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.