NLA-lib Explorer

NLAlib.Computation.exists_eq_one_add_mul_sub_sum_of_relErr

Library · theorem

A running difference, with the errors on the terms. Let 0 \le u < 1 and let s_{k+1} be s_k - q_k with relative error u, for q_k the number c_k with relative error u, k < K. Then s_K = (1 + \varepsilon)(s_0 - \sum_{k<K} c_k(1 + \eta_k)), with 1 + \varepsilon a product of K rounding factors and each 1 + \eta_k a product of k + 1. [Higham2002, §10.1].

NLAlib.Computation.exists_eq_one_add_mul_sub_sum_of_relErr {u : ℝ} {c s : ℕ → ℝ} (hu : 0 ≤ u)
  (hu1 : u < 1) (K : ℕ)
  (h : ∀ k < K, ∃ q, Computation.RelErr u (c k) q ∧ Computation.RelErr u (s k - q) (s (k + 1))) :
  ∃ ε η,
    Computation.IsRoundingProduct u K ε ∧
      (∀ k < K, Computation.IsRoundingProduct u (k + 1) (η k)) ∧
        s K = (1 + ε) * (s 0 - ∑ k ∈ Finset.range K, c k * (1 + η k))

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.CholeskyTraceBounds.