Theorem 5:1, eq. (5:3b) — the cg directions are mutually conjugate
ProvedConjGrad.Termination.cg_directions_conjugateLet be a real symmetric positive definite matrix, let , and let be the direction vectors produced by the conjugate gradient method (3:1) started at . Then
This is the relation that makes the cg-method a method of conjugate directions.
Formalization Note The statement is for all indices; after the method reaches the solution the directions are .
import Mathlib import Definitions.Def_ConjGrad_Termination_cgIter open Matrix
namespace ConjGrad.Termination
/-- Theorem 5:1, eq. (5:3b) (Hestenes–Stiefel 1952, p. 414). For a symmetric positive
definite `A`, the directions `p₀, p₁, …` of the cg-method (3:1) are mutually conjugate:
`(pᵢ, Apⱼ) = 0` for `i ≠ j`. -/
theorem cg_directions_conjugate {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (hA : A.PosDef)
(k x₀ : Fin n → ℝ) :
∀ i j, i ≠ j → (cgIter A k x₀ i).p ⬝ᵥ (A *ᵥ (cgIter A k x₀ j).p) = 0 := 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.
Conclusion. For all with ,
The claim covers all pairs of distinct natural numbers, including indices greater than .
Degenerate cases.
- . All vectors are empty and the claim holds trivially.
- . Then , and every later is under the zero-quotient convention, so the claim holds.
- Zero quotients. After any residual vanishes, the directions produced by the zero-quotient convention are included in the claim.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.