NLA-lib Explorer

Forward error of an inner product

Library · Result group

Theorem (Computation.IsDotTrace.abs_sum_mul_sub_le). Forward error of an inner product [Higham2002, §3.1], (3.5) there, with the factor of [CarsonMaShao2026, (3)]: under the standard model with 0 \le u < 1, \Bigl\lvert \sum_{k<n} \mathbf{x}_k y_k - s_n \Bigr\rvert \le \gamma_n \sum_{k<n} \lvert \mathbf{x}_k \rvert \lvert y_k \rvert\,, \qquad \gamma_n = (1 - u)^{-n} - 1\,.

Headline

Lean statement and details
NLAlib.Computation.IsDotTrace.abs_sum_mul_sub_le {u : ℝ} {n : ℕ} {x y s : ℕ → ℝ}
  (h : Computation.IsDotTrace (fun x ↦ Computation.RelErr u) x y n s) (hu : 0 ≤ u) (hu1 : u < 1) :
  |∑ k ∈ Finset.range n, x k * y k - s n| ≤
    Computation.roundingFactor n u * ∑ k ∈ Finset.range n, |x k| * |y k|

Full source on GitHub

Copy link