You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the quantity checker in lib/quantity.ml, prove the QTT-semiring soundness of affine consumption:
If quantity_ok(prog) accepts a program under the (0, 1, ω) semiring with Scaled-Let (ADR-002) and the Mut quantity policy, then every @linear binding is consumed exactly once on every execution trace.
Concretely
quantity_ok(prog) ⟹ ∀ trace t of prog. ∀ binding b : QOne. uses_in_trace(b, t) = 1
Plus the dual:
QZero bindings consumed = 0 times
QOmega bindings consumed 0..∞ times
Mechanisation
Lean 4 or Coq. Target: formal/Quantity/{Semiring.lean, ScaledLet.lean, Soundness.lean}. The (0, 1, ω) semiring is well-studied (Atkey 2018 "Syntax and Semantics of Quantitative Type Theory") — mathlib has rough scaffolding.
Activity