NLA-lib Explorer

NLAlib.Ops.Blas.sumPairwise_iter_cost_sum

Library · theorem

The cost of pairwise summation of depth k, by evaluating the k-fold push-forward: for ⌈log₂ n⌉ < k, the count pairCount n. No call of sum is left.

NLAlib.Ops.Blas.sumPairwise_iter_cost_sum {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.Blas1Op Op] [Ops.Apart Ops.Blas1Op Ops.ScalarOp Op] (k n : ℕ)
  (h : Nat.clog 2 n < k) :
  (Ops.Blas.sumPairwise.iter k).cost (Ops.Has.inj Ops.Blas1Op.sum) [n] = Ops.Blas.pairCount n

Full source on GitHub

Import NLAlib.Ops.Profiles.BlasCert.