NLA-lib Explorer

NLAlib.CGRun.quadForm_sub_x_sub_smul_p_eq

Library · theorem

The energy after the exact step, expanded: for \mathbf{A}\mathbf{x}_\star = \mathbf{b}, with the gap \mathbf{g}_j = \mathbf{b} - \mathbf{A}\mathbf{x}_j - \mathbf{r}_j, \|\mathbf{x}_\star - \mathbf{x}_j - \gamma_j\mathbf{p}_j\|_{\mathbf{A}}^2 = \|\mathbf{x}_\star - \mathbf{x}_j\|_{\mathbf{A}}^2 - 2\gamma_j\mathbf{p}_j^{\mathsf{T}}\mathbf{r}_j - 2\gamma_j\mathbf{p}_j^{\mathsf{T}}\mathbf{g}_j + \gamma_j^2\mathbf{p}_j^{\mathsf{T}}\mathbf{A}\mathbf{p}_j \,.

NLAlib.CGRun.quadForm_sub_x_sub_smul_p_eq {n k : ℕ} (C : CGRun n k) {xs : Fin n → ℝ}
  (hx : C.A *ᵥ xs = C.b) (j : ℕ) :
  quadForm C.A (xs - C.x j - C.γ j • C.p j) =
    quadForm C.A (xs - C.x j) - 2 * C.γ j * C.p j ⬝ᵥ C.r j -
        2 * C.γ j * C.p j ⬝ᵥ (C.b - C.A *ᵥ C.x j - C.r j) +
      C.γ j ^ 2 * C.p j ⬝ᵥ C.A *ᵥ C.p j

Full source on GitHub

Import NLAlib.Krylov.FinitePrecision.CGRunSpectrum.