Theorem 6:1, eq. (6:1) — one cg step lowers by
ProvedConjGrad.ErrorDecrease.error_step_6_1Let be a real symmetric positive definite matrix, let , and let solve . Let , , , be the quantities of the cg-method (5:1) started at , let be the error function (4:5), and let be the Rayleigh quotient (4:12). Then for every , the step from to diminishes by the amount
This is (6:1) of the paper, whose step from to is written here with the index shifted by one. It shows that the error function decreases at every step of the cg-method, and summing it gives (6:2).
Formalization Note The statement is for all , including steps after termination, where every term is . The index is shifted (step goes from to ) to avoid natural-number subtraction.
import Mathlib import Definitions.Def_ConjGrad_ErrorDecrease_cgIter import Definitions.Def_ConjGrad_ErrorDecrease_errorFun import Definitions.Def_ConjGrad_ErrorDecrease_rayleigh open Matrix
namespace ConjGrad.ErrorDecrease
theorem error_step_6_1 {n : ℕ} (A : Matrix (Fin n) (Fin n) ℝ) (hA : A.PosDef)
(k x₀ h : Fin n → ℝ) (hh : A *ᵥ h = k) (i : ℕ) :
errorFun A h (cgIter A k x₀ i).x - errorFun A h (cgIter A k x₀ (i + 1)).x =
cgAlpha A (cgIter A k x₀ i) * ((cgIter A k x₀ i).r ⬝ᵥ (cgIter A k x₀ i).r) ∧
cgAlpha A (cgIter A k x₀ i) * ((cgIter A k x₀ i).r ⬝ᵥ (cgIter A k x₀ i).r) =
rayleigh A (cgIter A k x₀ i).p *
(((cgIter A k x₀ i).x - (cgIter A k x₀ (i + 1)).x) ⬝ᵥ
((cgIter A k x₀ i).x - (cgIter A k x₀ (i + 1)).x)) := 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 .
- are arbitrary.
- satisfies .
- is arbitrary.
The sequence. is generated from , and as follows:
- Start with .
- Set , then and .
- Set and .
- Division by zero yields .
Functions used.
- The error function is .
- The Rayleigh quotient is , with .
Conclusion. Both of the following equalities hold:
Here is the squared Euclidean norm and is the step length defined above.
Degenerate cases.
- : then , so and . Also , so all three expressions are .
- : the left-hand expressions in both equalities are .
- : everything is .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.