Couplings of measures #
This file defines couplings directly at Mathlib's Measure boundary. A coupling is a joint
measure whose first and second marginals are the requested measures. No discreteness or
countability assumption is built into the definition.
The elementary constructors are the diagonal (IsCoupling.refl), the graph of a measurable map
(IsCoupling.graph), Dirac pairs, the swap and pushforwards. Two finite measures with the same
total mass have a coupling, the normalized product (IsCoupling.smul_prod), and only measures
with the same total mass do (IsCoupling.apply_univ_eq).
The remaining laws read a coupling concentrated on the graph of a measurable map, z.2 = f z.1
almost everywhere. Its second marginal is the pushforward of its first
(IsCoupling.eq_map_of_ae_eq), and the joint measure is the graph coupling
(IsCoupling.joint_eq_map_of_ae_eq). A coupling
concentrated on the diagonal therefore has equal marginals (IsCoupling.eq_of_ae_eq), with no
measurability assumption on the diagonal. Couplings compose with such functional couplings
(IsCoupling.trans_of_ae_eq); composing couplings of arbitrary relations would need a gluing
construction, which this file does not provide.
These are the measure-theoretic foundation of the relational program logic
ExpectationWP.RelWP, whose postconditions hold almost everywhere under the joint measure.
c is a coupling of μ and ν when its two marginals are exactly μ and ν.
The first marginal of the joint measure.
The second marginal of the joint measure.
Instances
A joint measure together with its two marginal equations.
The joint response law.
- isCoupling : self.joint.IsCoupling μ ν
Its marginal equations.
Instances For
A coupling has the same total mass as its first marginal.
A coupling has the same total mass as its second marginal.
Measures admitting a coupling necessarily have equal total mass.
Concentration of the marginals gives concentration of the joint pair.
Dirac marginals force the joint output pair almost everywhere.
The diagonal pushforward is a self-coupling of any measure.
The graph of a measurable map couples a measure with its pushforward.
The product of two probability measures is an independent coupling.
Two finite measures of the same total mass are coupled by their product, normalized by that mass.
A Dirac measure at a pair couples the corresponding Dirac marginals.
Swapping the coordinates of a coupling swaps its marginals.
Measurable maps of both coordinates transport a coupling to the pushed-forward marginals.
A measurable map of the second coordinate composes a coupling with the graph coupling of that map.
Couplings concentrated on a graph #
The second marginal of a coupling concentrated on the graph of a measurable map is the pushforward of the first marginal.
A coupling concentrated on the graph of a measurable map is the graph coupling of its first marginal.
A coupling concentrated on the diagonal has equal marginals. The diagonal need not be a measurable set.
A coupling of μ and ν composes with a coupling of ν and ρ concentrated on the graph of
a measurable map g: mapping the second coordinate by g couples μ and ρ.
The underlying joint measure.
Instances For
The joint law's marginal certificate.
Equations
- ⋯ = ⋯
Instances For
Canonical diagonal self-coupling.
Equations
- MeasureTheory.Measure.Coupling.refl μ = { joint := MeasureTheory.Measure.map (fun (a : α) => (a, a)) μ, isCoupling := ⋯ }
Instances For
The diagonal coupling's joint law is the diagonal pushforward.
Independent-product coupling of probability measures.
Equations
- MeasureTheory.Measure.Coupling.prod μ ν = { joint := μ.prod ν, isCoupling := ⋯ }
Instances For
Coupling of two pure outcomes.
Equations
- MeasureTheory.Measure.Coupling.dirac a b = { joint := MeasureTheory.Measure.dirac (a, b), isCoupling := ⋯ }
Instances For
The joint law of two pure outcomes is their paired Dirac measure.
Swap the coordinates of a coupling.
Instances For
Push a coupling forward through a pair of measurable functions.