Theorem 5:3, eq. (5:6a) — for
ProvedConjGrad.ErrorDecrease.direction_inner_5_6aLet be a real symmetric positive definite matrix, let , and let and be the residuals and direction vectors of the cg-method (5:1) started at . Then for all indices ,
In particular for all : the direction vectors never make an obtuse angle with each other. In the proof of Theorem 6:3 this relation expresses the inner products through the squared residuals.
Formalization Note The identity is stated for all , without the restriction to steps before termination. After termination the recursion gives , and both sides are (the right side through Lean's convention when ).
import Mathlib import Definitions.Def_ConjGrad_ErrorDecrease_cgIter open Matrix
namespace ConjGrad.ErrorDecrease
theorem direction_inner_5_6a {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (hA : A.PosDef)
(k x₀ : Fin n → ℝ) (i j : ℕ) (hij : i ≤ j) :
(cgIter A k x₀ i).p ⬝ᵥ (cgIter A k x₀ j).p =
((cgIter A k x₀ j).r ⬝ᵥ (cgIter A k x₀ j).r) *
((cgIter A k x₀ i).p ⬝ᵥ (cgIter A k x₀ i).p) /
((cgIter A k x₀ i).r ⬝ᵥ (cgIter A k x₀ i).r) := by sorry
end ConjGrad.ErrorDecrease
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting and hypotheses.
- is a natural number.
- is a positive definite real matrix: symmetric, with for all .
- are arbitrary. No solution vector is involved.
- are natural numbers.
The sequence. is generated from , and as follows:
- Start with .
- Set , then and .
- Set and .
- Division by zero yields .
Conclusion. The statement asserts
where is the squared Euclidean norm.
Degenerate cases.
- : the right-hand side is by the division convention, so the claim becomes .
- : the claim is when . When it asserts , i.e. .
- : both sides are .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.