Couplings of two measures #
A coupling, or transport plan, of a measure μ on X and a measure ν on Y is a measure
π on X × Y whose two marginals are μ and ν. It is the primitive object of optimal
transport: the primal transport problem minimises a cost over the couplings of two fixed
measures, so every statement about that problem is a statement about the set defined here.
Nothing in this file needs a topology, a metric, a density, or a normalisation, and the two
factors may be different measurable spaces. The relation is therefore stated for arbitrary
measures, and the probability case is packaged separately as a subtype of
MeasureTheory.ProbabilityMeasure (X × Y).
Main definitions #
TauCeti.IsCoupling π μ ν— the plan-first coupling relation:π.fst = μandπ.snd = ν;TauCeti.Coupling μ ν— couplings of two probability measures, bundled as a subtype ofMeasureTheory.ProbabilityMeasure (X × Y);TauCeti.Coupling.prod— the independent coupling, and with itTauCeti.Coupling.instNonempty.
Main statements #
TauCeti.IsCoupling.measure_prod_univandTauCeti.IsCoupling.measure_univ_prod— the marginal formulas on measurable cylinders, with the converseTauCeti.isCoupling_of_measure_prod_univ_of_measure_univ_prod;TauCeti.IsCoupling.measurePreserving_fst,TauCeti.IsCoupling.measurePreserving_snd,TauCeti.IsCoupling.integral_comp_fst, andTauCeti.IsCoupling.integral_comp_snd— projection and integral-transfer forms of the marginal conditions;TauCeti.IsCoupling.smul,TauCeti.IsCoupling.add,TauCeti.IsCoupling.sumandTauCeti.isCoupling_zero— the relation is compatible with the additive and scalar structure of measures, which is what mixtures of transport problems use;TauCeti.IsCoupling.sub_add— replacing a finite part of a coupling by a measure with the same two marginals keeps the coupling property, which is how a plan is perturbed locally;TauCeti.IsCoupling.prodProdProdComm— exchanging the two middle coordinates of a product of two couplings couples the two product measures;TauCeti.IsCoupling.map_prod— a coupling run alongside an independent sample, with measurable maps applied to both coordinates, couples the two pushed-forward products;TauCeti.exists_isCoupling_iff— a finite measure and any other measure admit a coupling exactly when they have the same total mass, the witness being their normalised product;TauCeti.isCoupling_sum_map_pi— pairing the source of each of finitely many independent samples with the target of a permuted one preserves both total marginals;TauCeti.isCoupling_map_swap_iffandTauCeti.isCoupling_map_prodMap_iff— invariance of the relation under the coordinate swap and under measurable equivalences of the two factors;TauCeti.isCoupling_toMeasure_iff— the coupling condition on bundled probability measures, as the pair of equations for the two marginal pushforwards;TauCeti.IsCoupling.eq_map_prodMk— a coupling out of a Dirac measure is the pushforward of its target alongy ↦ (x, y), so it is unique;IsCoupling.eq_diracspecialises this to a pair of Dirac measures.
Implementation notes #
The argument order IsCoupling π μ ν takes the plan first, so that a hypothesis
hπ : IsCoupling π μ ν supports dot notation such as hπ.swap and hπ.map. This convention,
and the choice to state the relation for raw measures rather than only for bundled probability
measures, follow Joseph K. Miller's Apache-2.0 Vlasov.IsCoupling
(https://github.com/Hydrodynamical/Vlasov_Meanfield_Formalization), the closest existing Lean
development of the same relation; no code is taken from it. The bundled subtype mirrors
TauCeti.MultiCoupling, the multi-marginal analogue already in this repository.
The declarations sit in the bare TauCeti namespace rather than in TauCeti.Measure:
scripts/lint-dot-notation.py rejects a new declaration under TauCeti.<Mathlib type namespace> that takes an explicit argument of that type, because π.IsCoupling μ ν would not
elaborate there anyway. Dot notation on hπ works under either namespace; the bare namespace is
forced by the lint rule and matches TauCeti.MultiCoupling.
This is Layer 0, item 1 of the optimal-transport roadmap.
References #
TauCeti/MeasureTheory/Measure/Coupling/Basic.leanis the formal source for the measure-preserving projection and integral-transfer declarations and proofs adapted here to the plan-firstTauCeti.IsCouplinginterface.- C. Villani, Optimal Transport: Old and New, Grundlehren 338, 2009, Chapter 1
("Couplings and changes of variables"), Definition 1.1, which is this relation for two
probability measures.
TauCeti.IsCouplingstates it for arbitrary measures, so the probability case is the bundledTauCeti.Coupling.
IsCoupling π μ ν says that the measure π on X × Y is a coupling, or transport plan,
of μ and ν: its first marginal is μ and its second marginal is ν.
The first marginal of a coupling is the prescribed source measure.
The second marginal of a coupling is the prescribed target measure.
Instances For
The first projection out of a coupling is measure preserving.
The second projection out of a coupling is measure preserving.
An integrable function of the first marginal remains integrable after composition with the first projection from a coupling.
An integrable function of the second marginal remains integrable after composition with the second projection from a coupling.
The sum of two integrable marginal functions is integrable against every coupling.
A function of the first coordinate integrates against a coupling as it does against the first marginal.
A function of the second coordinate integrates against a coupling as it does against the second marginal.
A coupling gives the measurable cylinder s ×ˢ univ the source mass of s.
A coupling gives the measurable cylinder univ ×ˢ t the target mass of t.
The source measure of a coupling has the total mass of the coupling.
The target measure of a coupling has the total mass of the coupling.
Coupled measures have equal total mass. Measures of different total mass are therefore not coupled by anything.
A coupling of a finite measure is finite.
A coupling of a probability measure is a probability measure.
A coupling with a finite target measure is finite.
A coupling with a probability target measure is a probability measure.
The target of a coupling of a probability measure is a probability measure.
Exchanging the two coordinates of a coupling of μ and ν gives a coupling of ν
and μ.
Pushing a coupling forward coordinatewise along measurable maps couples the two pushforwards.
Scaling a coupling scales both of its marginals by the same factor.
The sum of a coupling of μ, ν and a coupling of μ', ν' couples μ + μ' and ν + ν'.
A convex combination of two couplings of μ and ν is again a coupling of μ and ν.
The sum of a family of couplings couples the sums of the two families of marginals.
Rerouting part of a coupling. Removing a finite part κ ≤ π of a coupling and putting
back any measure κ' with the same two marginals as κ gives again a coupling of the same
pair.
Pushing a coupling forward along a measurable map of the source alone.
Pushing a coupling forward along a measurable map of the target alone.
Rearranging a product of plans. Exchanging the two middle coordinates of the product of a
coupling of μ, ν and a coupling of μ', ν' gives a coupling of μ ⊗ μ' and ν ⊗ ν'.
Running a coupling alongside an independent sample. If π couples μ and ν, then
sampling (x, y) ∼ π and an independent z ∼ η and applying f (·, z) and g (·, z) to the two
coordinates couples the pushforwards of μ ⊗ η along f and of ν ⊗ η along g.
The converse of TauCeti.IsCoupling.measure_prod_univ and
TauCeti.IsCoupling.measure_univ_prod: the coupling relation can be checked on measurable
cylinders, one for each factor.
The coupling relation is invariant under exchanging the two coordinates.
The coupling relation is invariant under measurable equivalences of the two factors.
The zero measure couples the two zero measures.
The product measure couples two probability measures, so probability measures always have a coupling.
A finite measure and a measure of equal total mass are coupled by their normalised product.
The equality makes the second measure finite. The statement includes the zero measures, where
the normalising factor is ∞ and the plan is 0.
A finite measure and any measure admit a coupling exactly when they have the same total mass.
Draw independent samples w i ∼ ρ i of pairs and pair the source of w i with the target of
w (σ i). Summed over i, the laws of these permuted pairs have the same two marginals as
∑ i, ρ i.
A Dirac measure and a probability measure are coupled by the pushforward of the latter
along y ↦ (x, y).
Two Dirac measures are coupled by the Dirac measure at the pair.
A plan whose source marginal is a Dirac measure is the pushforward of its target marginal
along y ↦ (x, y). Together with TauCeti.isCoupling_map_prodMk this says that a Dirac source
has exactly one coupling with each probability target.
Two Dirac measures have exactly one coupling, the Dirac measure at the pair.
Being a coupling, read on bundled probability measures: the two marginal pushforwards are the prescribed marginals. This is the form in which the coupling condition is a pair of preimages of points under the marginal maps.
Couplings of two probability measures, bundled as a subtype of the probability measures on
the product. The unbundled relation TauCeti.IsCoupling is the one to use for raw
measures; this type is the domain over which the probability transport problem is optimised.
Equations
- TauCeti.Coupling μ ν = { π : MeasureTheory.ProbabilityMeasure (X × Y) // TauCeti.IsCoupling ↑π ↑μ ↑ν }
Instances For
Two bundled couplings are equal when their underlying measures are equal.
The independent coupling of two probability measures: their product.
Equations
- TauCeti.Coupling.prod μ ν = ⟨μ.prod ν, ⋯⟩
Instances For
The underlying probability measure of the independent coupling is the product probability measure.
Any two probability measures are coupled, by their product.
The first marginal of a bundled coupling.
Instances For
The second marginal of a bundled coupling.
Instances For
The underlying measure of the first marginal is the pushforward along the first projection.
This is not a simp lemma: simp rewrites π.fst to μ via fst_eq instead.
The underlying measure of the second marginal is the pushforward along the second projection.
This is not a simp lemma: simp rewrites π.snd to ν via snd_eq instead.
The first marginal of a bundled coupling is its prescribed source.
The second marginal of a bundled coupling is its prescribed target.
Exchanging the two coordinates of a bundled coupling.
Instances For
The underlying probability measure of the exchanged coupling is the pushforward along the coordinate swap.
Exchanging the coordinates twice is the identity.
Exchanging the coordinates of the independent coupling gives the independent coupling of the exchanged pair.