Quantitative RelWP carrier for OracleComp (Loom2-style default) #
This file is the home of the default quantitative Std.Do'.RelWP
instance for pairs of OracleComp programs valued in ℝ≥0∞. The
rwpTrans field wraps the existing eRelWP
(VCVio/ProgramLogic/Relational/QuantitativeDefs.lean:31); the three
RelWP axioms are discharged by the existing eRelWP_pure,
eRelWP_bind_le, eRelWP_mono lemmas
(VCVio/ProgramLogic/Relational/Quantitative.lean).
Layout #
This is one of three relational carriers we register on
OracleComp. Because Std.Do'.RelWP's Pred is an outParam, only
one carrier can be visible to instance synthesis at a time. We
register them asymmetrically, matching the unary tier in
VCVio/ProgramLogic/Unary/Loom/:
- This file (
Loom/Quantitative.lean) — theℝ≥0∞carrier as a normalinstance, always live once the file is imported. This is the default. Loom/Qualitative.lean— thePropcarrier as ascoped instanceundernamespace OracleComp.Rel.Qualitative, opt-in viaopen OracleComp.Rel.Qualitative.Loom/Probabilistic.lean— theProbcarrier as ascoped instanceundernamespace OracleComp.Rel.Probabilistic, opt-in viaopen OracleComp.Rel.Probabilistic.
There is no umbrella Relational/Loom.lean re-export. Consumers
import the specific carrier they need.
Lattice plumbing #
The Lean.Order.{PartialOrder, CompleteLattice} adapters for ℝ≥0∞
are shipped by VCVio/ProgramLogic/Unary/Loom/Quantitative.lean and
re-used here unchanged. We do not redefine them.
Quantitative Std.Do'.RelWP interpretation of pairs of OracleComp
programs valued in ℝ≥0∞.
The rwpTrans is the existing eRelWP (the supremum over couplings
of expected values); the two EPost.nil arguments are ignored since
neither side of an OracleComp pair has a first-class exception slot.
The three RelWP axioms reduce to the existing eRelWP_pure,
eRelWP_bind_le, eRelWP_mono lemmas.
Definitional alignment with eRelWP #
The keystone lemma confirms Std.Do'.rwp agrees with eRelWP on the
nose, so every existing eRHL theorem in
VCVio/ProgramLogic/Relational/Quantitative.lean transports for free
when the user rewrites Std.Do'.rwp _ _ _ _ _ ↦ eRelWP _ _ _.
Std.Do'.RelTriple agrees with the raw quantitative lower-bound form.
Quantitative RelTriple rules #
Pure rule for the default quantitative Std.Do'.RelTriple carrier.
Consequence rule for the default quantitative Std.Do'.RelTriple carrier.
Bind rule for the default quantitative Std.Do'.RelTriple carrier.
Uniform sampling under a bijection for the default quantitative
Std.Do'.RelTriple carrier.
Identity coupling for uniform sampling under the default quantitative
Std.Do'.RelTriple carrier.
Oracle query under a bijection for the default quantitative
Std.Do'.RelTriple carrier.
Identity coupling for oracle queries under the default quantitative
Std.Do'.RelTriple carrier.