NLA-lib Explorer

NLAlib.Computation.norm_sub_mulVec_sub_le_of_isSubstRowTrace

Library · theorem

The rounded residual. If s runs through s_0 = \mathbf{b}_i and s_{j+1}, j < n, a rounded s_j - q_j for a rounded q_j of a_{ij}\mathbf{x}_j at unit roundoff u with (n + 1)u < 1, in every row i, then the final values \hat{\mathbf{r}} satisfy \|\mathbf{b} - \mathbf{A}\mathbf{x} - \hat{\mathbf{r}}\| \le (n + 1)\,\gamma_{n+1} \bigl(\|\mathbf{b}\| + \|\mathbf{A}\|_2\|\mathbf{x}\|\bigr),\qquad \gamma_{n+1} = (1 - u)^{-(n+1)} - 1. [Higham2002, §12.1]; normwise.

NLAlib.Computation.norm_sub_mulVec_sub_le_of_isSubstRowTrace {n : ℕ} {A : Matrix (Fin n) (Fin n) ℝ}
  {b x rh : Fin n → ℝ} {u : ℝ} (hu : 0 ≤ u) (hu1 : (↑n + 1) * u < 1)
  (h :
    ∀ (i : Fin n),
      ∃ s,
        Computation.IsSubstRowTrace (fun x ↦ Computation.RelErr u)
            (fun i j ↦ if hi : i < n then if hj : j < n then A ⟨i, hi⟩ ⟨j, hj⟩ else 0 else 0)
            (fun i ↦ if hi : i < n then b ⟨i, hi⟩ else 0)
            (fun j ↦ if hj : j < n then x ⟨j, hj⟩ else 0) (↑i) n s ∧
          s n = rh i) :
  ‖WithLp.toLp 2 (b - A *ᵥ x - rh)‖ ≤
    (↑n + 1) * Computation.roundingFactor (n + 1) u *
      (‖WithLp.toLp 2 b‖ + specNorm A * ‖WithLp.toLp 2 x‖)

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.CholeskyRoundingError.