NLA-lib Explorer

Matrix.PosDef.lanczosTridiagonal_eq_cgTridiagonal

Library · theorem

Exact CG computes the Lanczos tridiagonal matrix (the CG–Lanczos correspondence): for positive definite real \mathbf{A} and residuals \mathbf{r}_j \ne \mathbf{0}, j < k, of CG from \mathbf{x}_0 = \mathbf{0}, NLAlib.lanczosTridiagonal A b k = NLAlib.cgTridiagonal of the step lengths and residual norms. [MeurantStrakos2006, §3.1]; [HestenesStiefel1952, §18].

Matrix.PosDef.lanczosTridiagonal_eq_cgTridiagonal.{u_2} {n : Type u_2} [Fintype n]
  {A : Matrix n n ℝ} (hA : A.PosDef) (b : n → ℝ) (k : ℕ) (hr : ∀ j < k, (cgState A b 0 j).r ≠ 0) :
  lanczosTridiagonal A b k =
    cgTridiagonal (fun j ↦ cgAlpha A (cgState A b 0 j))
      (fun j ↦ ‖WithLp.toLp 2 (cgState A b 0 j).r‖) k

Full source on GitHub

Import NLAlib.Krylov.LinearSystems.CGTridiagonal.