NLA-lib Explorer

NLAlib.Ops.writes_call_const

Library · theorem

A constant-valued scalar call writes its cell with the ordinary frame and unchanged tape position. The output needs capacity but no prior initialization.

NLAlib.Ops.writes_call_const {Op Tst K : Type} {md : Ops.Mode} {I : Ops.Interp Op Tst K}
  {τ : Ops.Tape K} {ρ : Ops.Env} {m : Ops.Mem K} {o : Op} {v : K}
  {adm : List ℕ → List (ℕ × ℕ) → List (ℕ × ℕ) → Prop}
  (hI : I.IsFn Ops.Mode.total o (Ops.BlockFn.const v) adm) {out : Ops.Operand} {z : ℕ × ℕ}
  (hout : Ops.Operand.eval ρ out = some z) (hadm : adm [] [] [z]) (hz : z.2 < m.store.len z.1) :
  Ops.Writes md I τ (Ops.Stmt.call o [] [] [out]) ρ (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.