NLA-lib Explorer

NLAlib.Ops.writes_call_fn1

Library · theorem

A functional operation with one known output block, in the form used by matrix kernels.

NLAlib.Ops.writes_call_fn1 {Op Tst K : Type} {md : Ops.Mode} {I : Ops.Interp Op Tst K}
  {τ : Ops.Tape K} {ρ : Ops.Env} {m : Ops.Mem K} {o : Op} {f : Ops.BlockFn K}
  {adm : List ℕ → List (ℕ × ℕ) → List (ℕ × ℕ) → Prop} (hI : I.IsFn md o f adm) {ds : List Ops.IExp}
  {ins outs : List Ops.Operand} {d : List ℕ} {a : List (ℕ × ℕ)} {z : ℕ × ℕ} {xs : List (List K)}
  {y : List K} {l : ℕ} (hd : Ops.IExp.evalList ρ.idx ds = some d)
  (ha : Ops.Operand.evalList ρ ins = some a) (hb : Ops.Operand.evalList ρ outs = some [z])
  (hnd : d.length = f.nd) (hls : f.outLens d = [l]) (hadm : adm d a [z]) (hl : m.Live (a ++ [z]))
  (hr : m.readBlocks a (f.inLens d) = some xs)
  (hfn : f.fn d (τ.window f.stream m.pos (f.win d)) xs = some [y]) (hy : y.length = l)
  (hz : z.2 + l ≤ m.store.len z.1) :
  Ops.Writes md I τ (Ops.Stmt.call o ds ins outs) ρ (Ops.Store.inBlock z.1 z.2 l)
    (fun m' ↦ m'.pos = m.pos + f.win d ∧ m'.store.readBlock z.1 z.2 l = some y) m

Full source on GitHub

Import NLAlib.Ops.Logic.Functional.