NLA-lib Explorer

NLAlib.Ops.sumPairwise_satisfies

Library · theorem

Standard rounding

Pairwise summation satisfies the contract of sum for the lengths n with ⌈log₂ n⌉ < k + 1, over an interpretation whose sum meets it for ⌈log₂ n⌉ < k: one level of the recursion, a consequence of the judgment of its routine.

NLAlib.Ops.sumPairwise_satisfies {K Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.Blas1Op Op] [Inhabited K] {M : Ops.Machine K} {I : Ops.Interp Op Tst K}
  (hI : Ops.IsScalar M I) {u : ℝ} {dec : K → ℝ} (hM : Ops.StdModel u dec M) (hu : 0 ≤ u) {k : ℕ}
  (hS : Ops.IsSum dec (fun n ↦ (1 + u) ^ Nat.clog 2 n - 1) (fun n ↦ Nat.clog 2 n < k) I) :
  Ops.sumPairwiseRoutine.impl.Satisfies I Ops.Mode.total
    ((Ops.sumRel dec fun n ↦ (1 + u) ^ Nat.clog 2 n - 1).spec
      (Ops.OutApart fun n ↦ Nat.clog 2 n < k + 1))

Full source on GitHub

Import NLAlib.Ops.Blas.Sum.