NLA-lib Explorer

NLAlib.Ops.Reference.Execution.eq_static_of_straight

Library · theorem

Exact resources under the execution rules: an outcome the rules derive for a program without tests has exactly the static count of the tree and exactly its static scratch.

NLAlib.Ops.Reference.Execution.eq_static_of_straight {Op Tst K : Type} {r b : ℕ}
  {p : Ops.Program Op Tst r b} (hs : p.body.Straight) {I : Ops.Interp Op Tst K}
  {R : Ops.ResourceModel Op Tst} {formats : Fin b → Ops.StorageFormat} {τ : Ops.Tape K}
  {d : Fin r → ℕ} {m : Ops.Mem K} {st : Ops.Reference.State Op Tst K}
  (h : Ops.Reference.Execution p I R formats τ d m st) :
  st.cost = Ops.staticCost p d ∧ st.peak = Ops.staticPeak R p d

Full source on GitHub

Import NLAlib.Ops.StraightCount.