NLAlib.Ops.Examples.mm_wp_entry
Library · theorem
One entry: the accumulation loop appends entry i c + j to the block written so far.
NLAlib.Ops.Examples.mm_wp_entry {K : Type} [Inhabited K] {M : Ops.Machine K}
{I : Ops.Interp Ops.ScalarOp Empty K} (hI : Ops.Examples.IsArith M I) {md : Ops.Mode}
{τ : Ops.Tape K} {a b c i j : ℕ} (hi : i < a) (hj : j < c) {A B C : ℕ × ℕ} {s : Ops.Store K}
{p : ℕ} {As Bs : List K} {tb : Ops.Buf K} (hAC : A.1 ≠ C.1) (hBC : B.1 ≠ C.1)
(hA : s.readBlock A.1 A.2 (a * b) = some As) (hB : s.readBlock B.1 B.2 (b * c) = some Bs)
(hC : C.2 + a * c ≤ s.len C.1) (htb : List.length tb = 1) {Q : Ops.Mem K → Prop}
(hQ :
∀ (tb' : Ops.Buf K),
List.length tb' = 1 →
Q
{
store :=
s.updBlock C.1 C.2 (Ops.Examples.mmPrefix M b c As Bs (i * c + j + 1)) ++ [tb'],
pos := p }) :
Ops.Wp md I τ
(Ops.Examples.dotLoop (Ops.IExp.var 1)
{ buf := 0, off := Ops.IExp.var 3 + Ops.IExp.var 6 * Ops.IExp.var 1 + Ops.IExp.var 8 }
{ buf := 1, off := Ops.IExp.var 4 + Ops.IExp.var 8 * Ops.IExp.var 2 + Ops.IExp.var 7 }
{ buf := 2, off := Ops.IExp.var 5 + Ops.IExp.var 6 * Ops.IExp.var 2 + Ops.IExp.var 7 }
{ buf := 3, off := Ops.IExp.const 0 })
{ idx := [a, b, c, A.2, B.2, C.2, i, j], buf := [A.1, B.1, C.1, List.length s] } Q
{ store := s.updBlock C.1 C.2 (Ops.Examples.mmPrefix M b c As Bs (i * c + j)) ++ [tb],
pos := p }Import NLAlib.Ops.Examples.MatMul.