NLA-lib Explorer

NLAlib.Ops.StdModel.norm_foldl_linearComplex_sub_le

Library · theorem

Standard rounding

A rounded accumulation of products: the multiply–adds of NLAlib.matMulWord, from the pair of the literal 0, over a list of indices, are within (1 + a)^k(5\boldsymbol{u}T + k a S) of the exact sum, a = 6\boldsymbol{u} + 5\boldsymbol{u}^2, k the length, T the sum of \lvert \mathbf{x}_l\rvert\lvert y_l\rvert and S \ge T.

NLAlib.Ops.StdModel.norm_foldl_linearComplex_sub_le.{u_1} {M : Ops.Machine ℝ} {u : ℝ}
  (hM : Ops.StdModel u id M) (hu0 : 0 ≤ u) (hu : u ≤ 1 / 8) {ι : Type u_1} (x y : ι → ℂ)
  (ls : List ι) {S : ℝ} (hS : (List.map (fun l ↦ ‖x l‖ * ‖y l‖) ls).sum ≤ S) :
  ‖List.foldl (fun s l ↦ linearComplex M (x l) { re := M.lit 1, im := M.lit 0 } (y l) s)
          { re := M.lit 0, im := M.lit 0 } ls -
        (List.map (fun l ↦ x l * y l) ls).sum‖ ≤
    (1 + (6 * u + 5 * u ^ 2)) ^ ls.length *
      (5 * u * (List.map (fun l ↦ ‖x l‖ * ‖y l‖) ls).sum + ↑ls.length * (6 * u + 5 * u ^ 2) * S)

Full source on GitHub

Import NLAlib.Matrix.FinitePrecision.StoredProducts.