Coupling for probability distributions #
Main theorem about coupling and bind operations
Existential version of IsCoupling.bind
Every SPMF has a diagonal self-coupling.
Diagonal self-coupling witness.
Instances For
Product coupling: when both distributions have no failure mass, their independent product forms a coupling.
This is the core coupling result for reasoning about pairs of computations that never
fail individually (e.g., OracleComp spec α via HasEvalPMF): the product distribution
do let a ← p; let b ← q; pure (a, b) witnesses that the pair has marginals (p, q).
Dirac couplings: when one marginal is pure #
When the left marginal is pure a (and analogously on the right), the coupling collapses
to the Dirac product (a, ·) <$> q. This is the key combinatorial ingredient behind
anchoring: the relational logic must agree with the unary logic in this corner.
Anchoring identity for tsum-style expectations on the left:
the expected value of g under any coupling between pure a and q is
the marginal expectation ∑' b, q b * g a b.
Anchoring identity for tsum-style expectations on the right:
the expected value of g under any coupling between p and pure b is
the marginal expectation ∑' a, p a * g a b.