NLA-lib Explorer

NLAlib.Ops.writes_call_un

Library · theorem

A unary scalar call returns its known word with the ordinary cell footprint. Input and output may alias exactly; output capacity and the actual input read imply their liveness.

NLAlib.Ops.writes_call_un {Op Tst K : Type} {md : Ops.Mode} {I : Ops.Interp Op Tst K}
  {τ : Ops.Tape K} {ρ : Ops.Env} {m : Ops.Mem K} {o : Op} {g : K → Option K}
  {adm : List ℕ → List (ℕ × ℕ) → List (ℕ × ℕ) → Prop}
  (hI : I.IsFn Ops.Mode.total o (Ops.BlockFn.un g) adm) {ins outs : List Ops.Operand} {x z : ℕ × ℕ}
  (ha : Ops.Operand.evalList ρ ins = some [x]) (hb : Ops.Operand.evalList ρ outs = some [z])
  (hadm : adm [] [x] [z]) {a v : K} (hx : m.store.get x.1 x.2 = some a) (hg : g a = some v)
  (hz : z.2 < m.store.len z.1) :
  Ops.Writes md I τ (Ops.Stmt.call o [] ins outs) ρ (Ops.Store.inBlock z.1 z.2 1)
    (fun m' ↦ m'.pos = m.pos ∧ m'.store.get z.1 z.2 = some v) m

Full source on GitHub

Import NLAlib.Ops.Logic.Functional.