NLA-lib Explorer

NLAlib.Ops.dotSum_wp_seq

Library · theorem

The linked dot tree executes using only scalar contracts. Products and accumulations are the actual machine operations; the only caller-visible update is the destination cell. Shared by the trees of NLAlib.Ops.dotSumRoutine, NLAlib.Ops.nrm2SumRoutine.

NLAlib.Ops.dotSum_wp_seq {K Op Tst : Type} [Ops.Has Ops.ScalarOp Op] [Ops.Has Ops.Blas1Op Op]
  [Ops.Apart Ops.Blas1Op Ops.ScalarOp Op] [Inhabited K] {M : Ops.Machine K}
  {I : Ops.Interp Op Tst K} (hI : Ops.IsScalar M I) {τ : Ops.Tape K} {n : ℕ} {x y z : ℕ × ℕ}
  {m : Ops.Mem K} {xs ys : List K} (hl : m.Live [x, y, z])
  (hx : m.store.readBlock x.1 x.2 n = some xs) (hy : m.store.readBlock y.1 y.2 n = some ys)
  (hz : z.2 < m.store.len z.1) :
  Ops.Wp Ops.Mode.total I τ (Ops.Stmt.link Ops.Blas.sumSeqTable Ops.dotSum)
    (Ops.Env.frame [n] [x, y, z])
    (fun m' ↦ m' = m.upd z (Ops.sumSeqF M (fun i ↦ M.mul (Ops.vec xs i) (Ops.vec ys i)) n)) m

Full source on GitHub

Import NLAlib.Ops.Blas.DotExecution.