NLAlib.cgStep_eq
Library · theorem
The specified real CG step expressed using dot products and componentwise arithmetic. Squared Euclidean residual norms equal self-dot products, and the real quadratic form is \mathbf{p}^{\mathsf{T}}\mathbf{A}\mathbf{p}. No positivity or nonbreakdown assumption is needed because division is total. This identifies the exact scalar-loop outputs with the existing recurrence.
NLAlib.cgStep_eq.{u_2} {n : Type u_2} [Fintype n] (A : Matrix n n ℝ) (s : CGState ℝ n) :
cgStep A s =
have α := s.r ⬝ᵥ s.r / s.p ⬝ᵥ A *ᵥ s.p;
have r' := fun i ↦ s.r i - α * (A *ᵥ s.p) i;
{ x := fun i ↦ s.x i + α * s.p i, r := r', p := fun i ↦ r' i + r' ⬝ᵥ r' / s.r ⬝ᵥ s.r * s.p i }Import NLAlib.Krylov.LinearSystems.CGRecurrence.