NLAlib.Ops.ScalarProducts.step_writes_word
Library · theorem
A streamed scalar step performs multiplication and addition, preserving the input accumulator through the disjoint temporary cell. Shared by the trees of NLAlib.reduceLastStep, NLAlib.hessenbergReduceLast, NLAlib.ShiftedQR.shiftedStep and 44 more.
NLAlib.Ops.ScalarProducts.step_writes_word {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {K : Type}
{M : Ops.Machine K} {I : Ops.Interp Op Tst K} {tape : Ops.Tape K} {m : Ops.Mem K}
(hS : Ops.IsScalar M I) {x y t out : ℕ × ℕ} (a b acc : K) (hl : m.Live [x, y, t, out])
(hX : m.store.readBlock x.1 x.2 1 = some [a]) (hY : m.store.readBlock y.1 y.2 1 = some [b])
(hA : m.store.readBlock out.1 out.2 1 = some [acc])
(hTO : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 1) (Ops.Store.inBlock out.1 out.2 1))
(ht : t.2 + 1 ≤ m.store.len t.1) (ho : out.2 + 1 ≤ m.store.len out.1) :
Ops.Writes Ops.Mode.total I tape Ops.ScalarProducts.step (Ops.Env.frame [] [x, y, t, out])
(Ops.Store.inBlock t.1 t.2 1 ⊔ Ops.Store.inBlock out.1 out.2 1)
(fun m' ↦ m'.pos = m.pos ∧ m'.store.readBlock out.1 out.2 1 = some [M.add acc (M.mul a b)]) mImport NLAlib.Ops.Blas.ScalarProducts.