NLA-lib Explorer

Matrix.PosDef.cgIterate_eq_of_krylovGrade_le

Library · theorem

Headline of cg-finite-termination

Finite termination: for positive definite \mathbf{A} and \mathbf{A}\mathbf{x}_\star = \mathbf{b}, CG reaches the solution once q is at least the grade of \mathbf{r}_0 = \mathbf{b} - \mathbf{A}\mathbf{x}_0, in particular at q = \lvert n \rvert: \mathsf{cgIterate}(\mathbf{A}, \mathbf{b}, \mathbf{x}_0, q) = \mathbf{x}_\star. [Saad2003, §6.2]. Result: cg-finite-termination

Matrix.PosDef.cgIterate_eq_of_krylovGrade_le.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2}
  [Fintype n] [DecidableEq n] {A : Matrix n n 𝕜} (hA : A.PosDef) {b xs : n → 𝕜} (hxs : A *ᵥ xs = b)
  (x₀ : n → 𝕜) {q : ℕ} (h : krylovGrade A (b - A *ᵥ x₀) ≤ q) : cgIterate A b x₀ q = xs

Full source on GitHub

Import NLAlib.Krylov.LinearSystems.CG.