NLAlib.Ops.evalCounted_exactly_of_straight
Library · theorem
The static count and workspace are exact without tests: a successful counted run of a tree with no test, no loop with early exit and no index query adds exactly the static count and raises the peak to exactly the static workspace above the live bytes.
NLAlib.Ops.evalCounted_exactly_of_straight {Op Tst K : Type} {I : Ops.Interp Op Tst K}
{W : Op → List ℕ → ℕ} {τ : Ops.Tape K} {s : Ops.Stmt Op Tst} (hs : s.Straight) {ρ : Ops.Env}
{st st' : Ops.St Op Tst K} (hst : st.cur ≤ st.peak)
(h : Ops.evalCounted I W τ s ρ st = some st') :
st.Exactly st' (Ops.stmtCost s ρ.idx) (Ops.stmtPeak W s ρ.idx)Import NLAlib.Ops.StraightCount.