NLA-lib Explorer

NLAlib.Ops.Examples.mmFn_apply

Library · theorem

What a successful call of the block function of mm is.

NLAlib.Ops.Examples.mmFn_apply {K : Type} {f : ℕ → ℕ → ℕ → List K → List K → List K} {d : List ℕ}
  {ins outs : List (ℕ × ℕ)} {τ : Ops.Tape K} {m m' : Ops.Mem K}
  (h : (Ops.Examples.mmFn f).apply d ins outs τ m = some m') :
  ∃ a b c A B z As Bs,
    d = [a, b, c] ∧
      ins = [A, B] ∧
        outs = [z] ∧
          m.store.readBlock A.1 A.2 (a * b) = some As ∧
            m.store.readBlock B.1 B.2 (b * c) = some Bs ∧
              (f a b c As Bs).length = a * c ∧
                z.2 + a * c ≤ m.store.len z.1 ∧ m' = m.updBlock z (f a b c As Bs)

Full source on GitHub

Import NLAlib.Ops.Examples.MatMul.