NLA-lib Explorer

NLAlib.Ops.Reference.eval_tally

Library · theorem

A bookkeeping tally adds exactly its charges without changing memory or scratch.

NLAlib.Ops.Reference.eval_tally {Op Tst K : Type} (I : Ops.Interp Op Tst K)
  (R : Ops.ResourceModel Op Tst) (τ : Ops.Tape K) (ks : List Ops.Bookkeeping) (ρ : Ops.Env)
  (a : Ops.Reference.State Op Tst K) (ha : a.cur ≤ a.peak) :
  Ops.evalCounted I.instrument (Ops.instrumentWorkspace R.workspace) τ (Ops.tally ks) ρ a =
    some (Ops.Reference.charge (Ops.Reference.charges ks) a)

Full source on GitHub

Import NLAlib.Ops.Reference.Accounting.