NLA-lib Explorer

NLAlib.Ops.evalCounted_original_instrument

Library · theorem

Projecting an actual instrumented run recovers exactly the source run's memory and original operation/query counts. Structural counts remain present in the canonical run. No equality of arbitrary initial or final workspace fields is asserted.

NLAlib.Ops.evalCounted_original_instrument {Op Tst K : Type} {I : Ops.Interp Op Tst K}
  {W : Op → List ℕ → ℕ} {τ : Ops.Tape K} {s : Ops.Stmt Op Tst} {ρ : Ops.Env} {m : Ops.Mem K}
  {st : Ops.St (Op ⊕ Ops.Bookkeeping) Tst K}
  (h :
    Ops.evalCounted I.instrument (Ops.instrumentWorkspace W) τ s.instrument ρ (Ops.St.init m) =
      some st) :
  ∃ raw,
    Ops.evalCounted I W τ s ρ (Ops.St.init m) = some raw ∧
      raw.mem = st.mem ∧ raw.cost = Ops.Count.original st.cost

Full source on GitHub

Import NLAlib.Ops.Certification.