NLA-lib Explorer

NLAlib.Ops.exec_link

Library · theorem

The simulation theorem: a successful counted run of the algorithm under the induced interpretation is matched by a counted run of the linked program under the lower interpretation, with the same memory, the weight of its counts within the weight of the upper counts and its peak within the peak. One induction serves the counts themselves and every weight.

NLAlib.Ops.exec_link {Op₁ Op₂ Tst K A : Type} [AddCommMonoid A] [PartialOrder A]
  [IsOrderedAddMonoid A] {T : Ops.Table Op₁ Op₂ Tst} {I : Ops.Interp Op₂ Tst K}
  {W₂ : Op₂ → List ℕ → ℕ} {w₂ : Ops.Count Op₂ Tst →+ A} {t : Op₁ → List ℕ → A}
  {W₁ : Op₁ → List ℕ → ℕ} (hacc : T.AccountsW I W₂ w₂ t W₁) (τ : Ops.Tape K) (s : Ops.Stmt Op₁ Tst)
  (ρ : Ops.Env) (a a₁ : Ops.St Op₁ Tst K) (c : Ops.St Op₂ Tst K) :
  Ops.Sim w₂ t a c →
    Ops.evalCounted (I.link T) W₁ τ s ρ a = some a₁ →
      ∃ c₁, Ops.evalCounted I W₂ τ (Ops.Stmt.link T s) ρ c = some c₁ ∧ Ops.Sim w₂ t a₁ c₁

Full source on GitHub

Import NLAlib.Ops.Transfer.