NLA-lib Explorer

NLAlib.sub_mulVec_gmresIterate

Library · theorem

The GMRES residual is a projection residual: \mathbf{b} - \mathbf{A}\,\mathsf{gmresIterate}(\mathbf{A}, \mathbf{b}, \mathbf{x}_0, q) = (\mathbf{I} - \mathbf{P}_{\mathbf{A}\mathbf{K}_q})\mathbf{r}_0, for e\mathbf{v}ery \mathbf{A}.

NLAlib.sub_mulVec_gmresIterate.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2} [Fintype n]
  [DecidableEq n] (A : Matrix n n 𝕜) (b x₀ : n → 𝕜) (q : ℕ) :
  b - A *ᵥ gmresIterate A b x₀ q =
    (1 - rangeProjector (A * krylovMatrix A (b - A *ᵥ x₀) q)) *ᵥ (b - A *ᵥ x₀)

Full source on GitHub

Import NLAlib.Krylov.LinearSystems.GMRES.