NLA-lib Explorer

NLAlib.Ops.map_addHistory_exec

Library · theorem

The evaluator carries the previous counts and peak through a run independently of the memory, live cells and accounting of the new segment.

NLAlib.Ops.map_addHistory_exec {Op Tst K : Type} (I : Ops.Interp Op Tst K) (W : Op → List ℕ → ℕ)
  (τ : Ops.Tape K) (s : Ops.Stmt Op Tst) (ρ : Ops.Env) (st : Ops.St Op Tst K)
  (cost : Ops.Count Op Tst) (peak : ℕ) :
  Option.map (Ops.St.addHistory cost peak) (Ops.evalCounted I W τ s ρ st) =
    Ops.evalCounted I W τ s ρ (Ops.St.addHistory cost peak st)

Full source on GitHub

Import NLAlib.Ops.Exec.