NLA-lib Explorer

Matrix.PosDef.eq_cgIterate_of_conjTranspose_krylovMatrix_mulVec_sub_eq_zero

Library · theorem

The Galerkin condition characterises CG: for positive definite \mathbf{A}, a vector of \mathbf{x}_0 + \mathcal{K}_q(\mathbf{A}, \mathbf{r}_0) whose residual is orthogonal to the Krylov space is \mathsf{cgIterate}(\mathbf{A}, \mathbf{b}, \mathbf{x}_0, q), where \mathbf{r}_0 = \mathbf{b} - \mathbf{A}\mathbf{x}_0. [Saad2003, §6.7]; there CG is defined by this condition ([Saad2003, (5.3)] with \mathcal{L} = \mathcal{K}), whose solution is unique since the projected matrix is nonsingular for positive definite \mathbf{A} ([Saad2003, Proposition 5.1]). Result: cg-galerkin-condition

Matrix.PosDef.eq_cgIterate_of_conjTranspose_krylovMatrix_mulVec_sub_eq_zero.{u_1, u_2}
  {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2} [Fintype n] [DecidableEq n] {A : Matrix n n 𝕜}
  (hA : A.PosDef) {b x₀ y : n → 𝕜} {q : ℕ} (hy : y - x₀ ∈ krylovSpace A (b - A *ᵥ x₀) q)
  (h : (krylovMatrix A (b - A *ᵥ x₀) q)ᴴ *ᵥ (b - A *ᵥ y) = 0) : y = cgIterate A b x₀ q

Full source on GitHub

Import NLAlib.Krylov.LinearSystems.CG.