NLAlib.Ops.writes_call_fn
Library · theorem
A functional call writes its known mathematical outputs and preserves every other cell. The input and output blocks may overlap: all inputs are read before the writes. Only the output blocks must be mutually disjoint so that every output can be read back.
NLAlib.Ops.writes_call_fn {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 b : List (ℕ × ℕ)} {xs ys : List (List K)}
(hd : Ops.IExp.evalList ρ.idx ds = some d) (ha : Ops.Operand.evalList ρ ins = some a)
(hb : Ops.Operand.evalList ρ outs = some b) (hnd : d.length = f.nd) (hadm : adm d a b)
(hap : Ops.Fp.Apart b (f.outLens d)) (hl : m.Live (a ++ b))
(hr : m.readBlocks a (f.inLens d) = some xs)
(hfn : f.fn d (τ.window f.stream m.pos (f.win d)) xs = some ys)
(hys : List.map List.length ys = f.outLens d) (hz : m.Room b (f.outLens d)) :
Ops.Writes md I τ (Ops.Stmt.call o ds ins outs) ρ (Ops.Fp.blocks b (f.outLens d))
(fun m' ↦ m'.pos = m.pos + f.win d ∧ m'.readBlocks b (f.outLens d) = some ys) mImport NLAlib.Ops.Logic.Functional.