NLA-lib Explorer

NLAlib.HasOrthonormalCols.gmresIterate_eq

Library · theorem

GMRES in any orthonormal basis of the Krylov space, for every \mathbf{A}: \mathsf{gmresIterate}(\mathbf{A}, \mathbf{b}, \mathbf{x}_0, q) = \mathbf{x}_0 + \mathbf{Q}(\mathbf{A}\mathbf{Q})^{+}\mathbf{r}_0. [Saad2003, §6.5.1].

NLAlib.HasOrthonormalCols.gmresIterate_eq.{u_1, u_2, u_3} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2}
  {r : Type u_3} [Fintype n] [DecidableEq n] [Fintype r] [DecidableEq r] {Q : Matrix n r 𝕜}
  (hQ : HasOrthonormalCols Q) {A : Matrix n n 𝕜} {b x₀ : n → 𝕜} {q : ℕ}
  (hK : Q.mulVecLin.range = krylovSpace A (b - A *ᵥ x₀) q) :
  gmresIterate A b x₀ q = x₀ + Q *ᵥ pinv (A * Q) *ᵥ (b - A *ᵥ x₀)

Full source on GitHub

Import NLAlib.Krylov.LinearSystems.GMRES.