Documentation

TauCeti.MeasureTheory.OptimalTransport.GraphPlan.Basic

Graph plans: the transport plan induced by a transport map #

A transport map from μ to ν is a map T : X → Y that pushes μ forward to ν. Mathlib already has the predicate for this, ProbabilityTheory.HasLaw T ν μ, which asks for μ-almost-everywhere measurability of T together with μ.map T = ν; this file adds no second predicate. What it adds is the optimal-transport interface around it: the graph plan TauCeti.graphPlan T μ, the pushforward of μ along x ↦ (x, T x), which is the transport plan that moves all the mass sitting at x to the single point T x.

Two facts organise the file. First, TauCeti.isCoupling_graphPlan_iff: for an almost-everywhere measurable T, the graph plan couples μ and ν exactly when T is a transport map from μ to ν. This is the passage from the Monge problem to the Kantorovich problem, whose effect on values is the change of variables TauCeti.lintegral_graphPlan; the resulting inequality of transport costs belongs to the cost theory and is stated in TauCeti/MeasureTheory/OptimalTransport/Cost/Basic.lean. Second, TauCeti.eq_graphPlan_iff: a plan is a graph plan exactly when it is deterministic, that is, concentrated on the graph of T. With TauCeti.graphPlan_eq_graphPlan_iff, which says that the map is determined μ-almost everywhere by its graph plan, this makes the graph construction a bijection between transport maps modulo μ-a.e. equality and deterministic plans.

Nothing here needs a topology, a metric or a normalisation, and the two factors are arbitrary measurable spaces. The determinism statements do ask that the diagonal of Y × Y be measurable, MeasurableEq Y, because "π is carried by the graph of T" is otherwise not a statement about a measurable set. That hypothesis holds for every standard Borel space, every second-countable Hausdorff space with measurable open sets and every countable measurable space with measurable singletons.

Main definitions #

Main statements #

Implementation notes #

TauCeti.graphPlan records the map in the second coordinate, matching the plan-first convention of TauCeti.IsCoupling π μ ν, in which the source is the first factor. The opposite convention is available as TauCeti.map_swap_graphPlan, which identifies the coordinate swap of a graph plan with the pushforward along x ↦ (T x, x).

Measurability hypotheses are AEMeasurable rather than Measurable throughout, because that is what ProbabilityTheory.HasLaw supplies and what the pushforward really uses. Both marginal formulas need T to be a.e. measurable: Measure.map sends a function that is not a.e. measurable to a junk Dirac mass, which neither marginal formula survives.

This module needs nothing from the transport cost, so it sits below it: the Monge-to-Kantorovich relaxation inequality of Layer 4, item 1, which the change of variables here supplies, is stated with the cost itself in TauCeti/MeasureTheory/OptimalTransport/Cost/Basic.lean.

This is Layer 0, item 2 of the optimal-transport roadmap.

References #

noncomputable def TauCeti.graphPlan {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] (T : X → Y) (μ : MeasureTheory.Measure X) :

The graph plan, or Monge plan, of a map T : X → Y and a measure μ on X: the pushforward of μ along x ↦ (x, T x). It is the transport plan that sends all the mass at x to the single point T x; TauCeti.isCoupling_graphPlan_iff says that it couples μ and ν exactly when T pushes μ forward to ν.

Equations
Instances For
    theorem TauCeti.graphPlan_def {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] (T : X → Y) (μ : MeasureTheory.Measure X) :
    graphPlan T μ = MeasureTheory.Measure.map (fun (x : X) => (x, T x)) μ

    The graph plan is the pushforward along the graph map. The definition's body is not exposed, so this is the lemma downstream modules should rewrite with.

    theorem TauCeti.aemeasurable_prodMk_self {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} (hT : AEMeasurable T μ) :
    AEMeasurable (fun (x : X) => (x, T x)) μ

    The graph map x ↦ (x, T x) is a.e. measurable as soon as T is.

    theorem TauCeti.graphPlan_apply {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} (hT : AEMeasurable T μ) {s : Set (X × Y)} (hs : MeasurableSet s) :
    (graphPlan T μ) s = μ {x : X | (x, T x) ∈ s}

    The graph plan of a measurable set is the mass of the set of points whose graph point lies in it.

    theorem TauCeti.graphPlan_prod {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} (hT : AEMeasurable T μ) {s : Set X} {t : Set Y} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    (graphPlan T μ) (s ×ˢ t) = μ (s ∩ T ⁻¹' t)

    The graph plan of a measurable rectangle is the mass of the part of its base that T maps into its height.

    @[simp]
    theorem TauCeti.graphPlan_zero {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] (T : X → Y) :
    graphPlan T 0 = 0

    The graph plan over the zero measure is the zero measure.

    @[simp]
    theorem TauCeti.snd_graphPlan {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} (hT : AEMeasurable T μ) :

    The second marginal of the graph plan of an a.e. measurable T is the pushforward of μ along T.

    @[simp]
    theorem TauCeti.fst_graphPlan {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} (hT : AEMeasurable T μ) :
    (graphPlan T μ).fst = μ

    The first marginal of the graph plan of an a.e. measurable T is μ.

    The graph plan of an a.e. measurable T couples μ and the pushforward μ.map T.

    theorem TauCeti.isCoupling_graphPlan {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} {ν : MeasureTheory.Measure Y} (hT : ProbabilityTheory.HasLaw T ν μ) :
    IsCoupling (graphPlan T μ) μ ν

    From the Monge problem to the Kantorovich problem: the graph plan of a transport map from μ to ν is a coupling of μ and ν.

    The graph plan of an a.e. measurable map couples μ and ν exactly when the map is a transport map from μ to ν. The Monge problem is therefore the Kantorovich problem restricted to the graph plans.

    A map transports μ to ν exactly when its graph plan has second marginal ν.

    theorem TauCeti.snd_graphPlan_of_hasLaw {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} {ν : MeasureTheory.Measure Y} (hT : ProbabilityTheory.HasLaw T ν μ) :
    (graphPlan T μ).snd = ν

    The second marginal of the graph plan of a transport map is its target.

    theorem TauCeti.snd_graphPlan_comp {X : Type u} {Y : Type v} {Z : Type w} [MeasurableSpace X] [MeasurableSpace Y] [MeasurableSpace Z] {T : X → Y} {μ : MeasureTheory.Measure X} {ν : MeasureTheory.Measure Y} {R : Y → Z} {ρ : MeasureTheory.Measure Z} (hR : ProbabilityTheory.HasLaw R ρ ν) (hT : ProbabilityTheory.HasLaw T ν μ) :
    (graphPlan (R ∘ T) μ).snd = ρ

    Chaining two transport maps chains the targets of their graph plans.

    The second marginal of the graph plan of a measure-preserving map is its target.

    The second marginal of the graph plan of the identity is the original measure.

    The identity is a transport map from μ to itself, so its graph plan — the diagonal plan, carried by the diagonal of X × X — couples μ with itself.

    A measurable equivalence is a transport map from μ to μ.map e.

    theorem TauCeti.aemeasurable_comp_fst_graphPlan {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T S : X → Y} {μ : MeasureTheory.Measure X} (hT : AEMeasurable T μ) (hS : AEMeasurable S μ) :
    AEMeasurable (fun (z : X × Y) => S z.1) (graphPlan T μ)

    A function of the first coordinate is a.e. measurable for a graph plan as soon as it is a.e. measurable for the source measure.

    theorem TauCeti.graphPlan_congr {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T S : X → Y} {μ : MeasureTheory.Measure X} (h : T =ᵐ[μ] S) :

    Two maps that agree μ-almost everywhere have the same graph plan.

    @[simp]
    theorem TauCeti.graphPlan_add {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ₁ μ₂ : MeasureTheory.Measure X} (hT₁ : AEMeasurable T μ₁) (hT₂ : AEMeasurable T μ₂) :
    graphPlan T (μ₁ + μ₂) = graphPlan T μ₁ + graphPlan T μ₂

    Taking the graph plan of a fixed map is additive in the source measure.

    @[simp]
    theorem TauCeti.graphPlan_smul {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} (c : ENNReal) {μ : MeasureTheory.Measure X} (hT : AEMeasurable T μ) :
    graphPlan T (c • μ) = c • graphPlan T μ

    Taking the graph plan of a fixed map commutes with rescaling the source measure.

    Exchanging the coordinates of a graph plan gives the pushforward of μ along x ↦ (T x, x), the graph plan for the opposite convention.

    theorem TauCeti.map_prodMap_id_graphPlan {X : Type u} {Y : Type v} {Z : Type w} [MeasurableSpace X] [MeasurableSpace Y] [MeasurableSpace Z] {T : X → Y} {μ : MeasureTheory.Measure X} {R : Y → Z} (hR : AEMeasurable R (MeasureTheory.Measure.map T μ)) (hT : AEMeasurable T μ) :

    Postcomposing a transport map with a map that is a.e. measurable for the transported measure pushes its graph plan forward in the second coordinate. Together with ProbabilityTheory.HasLaw.comp this is how transport maps compose.

    Reparametrizing the source measure pushes the graph plan through the first coordinate.

    A measurable equivalence and its inverse have graph plans exchanged by coordinate swap.

    theorem TauCeti.lintegral_graphPlan {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} {c : X × Y → ENNReal} (hT : AEMeasurable T μ) (hc : AEMeasurable c (graphPlan T μ)) :
    ∫⁻ (z : X × Y), c z ∂graphPlan T μ = ∫⁻ (x : X), c (x, T x) ∂μ

    Change of variables along a graph plan: integrating a cost against the graph plan of T is integrating the cost of moving x to T x.

    theorem TauCeti.integral_graphPlan {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : X × Y → E} (hT : AEMeasurable T μ) (hf : MeasureTheory.AEStronglyMeasurable f (graphPlan T μ)) :
    ∫ (z : X × Y), f z ∂graphPlan T μ = ∫ (x : X), f (x, T x) ∂μ

    Change of variables along a graph plan, Bochner version: integrating a vector-valued function against the graph plan of T is integrating its values at the graph points.

    theorem TauCeti.graphPlan_apply_compl_graph {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T S : X → Y} {μ : MeasureTheory.Measure X} [MeasurableEq Y] (hT : AEMeasurable T μ) (hS : AEMeasurable S μ) :
    (graphPlan T μ) {z : X × Y | ¬z.2 = S z.1} = μ {x : X | ¬T x = S x}

    The mass a graph plan of T gives to the complement of the graph of S is the mass of the set where T and S differ.

    theorem TauCeti.ae_snd_eq_graphPlan_iff {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T S : X → Y} {μ : MeasureTheory.Measure X} [MeasurableEq Y] (hT : AEMeasurable T μ) (hS : AEMeasurable S μ) :
    (∀ᵐ (z : X × Y) ∂graphPlan T μ, z.2 = S z.1) ↔ T =ᵐ[μ] S

    A graph plan of T is carried by the graph of S exactly when S agrees with T almost everywhere.

    theorem TauCeti.ae_snd_eq_graphPlan {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} [MeasurableEq Y] (hT : AEMeasurable T μ) :
    ∀ᵐ (z : X × Y) ∂graphPlan T μ, z.2 = T z.1

    A graph plan is carried by the graph of its map: almost every point of graphPlan T μ has second coordinate the value of T at its first.

    theorem TauCeti.eq_graphPlan_of_ae_snd_eq {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {π : MeasureTheory.Measure (X × Y)} (hT : AEMeasurable T π.fst) (h : ∀ᵐ (z : X × Y) ∂π, z.2 = T z.1) :
    π = graphPlan T π.fst

    A plan carried by the graph of T is the graph plan of T over its own first marginal. This direction needs no hypothesis on Y.

    theorem TauCeti.eq_graphPlan_iff {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {π : MeasureTheory.Measure (X × Y)} [MeasurableEq Y] (hT : AEMeasurable T π.fst) :
    π = graphPlan T π.fst ↔ ∀ᵐ (z : X × Y) ∂π, z.2 = T z.1

    A plan is deterministic exactly when it is a graph plan: a plan is the graph plan of T over its own first marginal if and only if it is concentrated on the graph of T.

    theorem TauCeti.graphPlan_eq_graphPlan_iff {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T S : X → Y} {μ : MeasureTheory.Measure X} [MeasurableEq Y] (hT : AEMeasurable T μ) (hS : AEMeasurable S μ) :
    graphPlan T μ = graphPlan S μ ↔ T =ᵐ[μ] S

    The map of a deterministic plan is unique: two a.e. measurable maps have the same graph plan exactly when they agree μ-almost everywhere.

    theorem TauCeti.comp_ae_eq_id_of_map_swap_graphPlan_eq {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.Measure X} [MeasurableEq Y] [MeasurableEq X] {R : Y → X} {ν : MeasureTheory.Measure Y} (hT : AEMeasurable T μ) (hR : AEMeasurable R ν) (h : MeasureTheory.Measure.map Prod.swap (graphPlan T μ) = graphPlan R ν) :
    R ∘ T =ᵐ[μ] id ∧ T ∘ R =ᵐ[ν] id

    Inverse graph plans come from inverse maps. If exchanging the coordinates of the graph plan of T : X → Y over μ gives the graph plan of R : Y → X over ν, then R ∘ T = id μ-almost everywhere and T ∘ R = id ν-almost everywhere.

    A transport map out of a Dirac measure forces the target to be the Dirac measure at its value. So the unique coupling of Measure.dirac x with a non-Dirac probability measure ν, namely the pushforward of ν along y ↦ (x, y), is not a graph plan: the Monge problem out of an atom is infeasible unless the target is an atom too.

    @[simp]

    The graph plan of an a.e. measurable map at a Dirac measure is the Dirac measure at the graph point.

    theorem TauCeti.toMeasure_map_prodMk_self {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] (T : X → Y) (μ : MeasureTheory.ProbabilityMeasure X) :
    ↑(μ.map fun (x : X) => (x, T x)) = graphPlan T ↑μ

    The bundled pushforward of a probability measure along the graph map x ↦ (x, T x) is the graph plan of T.

    noncomputable def TauCeti.Coupling.graph {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.ProbabilityMeasure X} {ν : MeasureTheory.ProbabilityMeasure Y} (hT : ProbabilityTheory.HasLaw T ↑ν ↑μ) :
    Coupling μ ν

    The graph plan of a transport map between two probability measures, bundled as an element of TauCeti.Coupling.

    Equations
    Instances For
      @[simp]
      theorem TauCeti.Coupling.coe_graph {X : Type u} {Y : Type v} [MeasurableSpace X] [MeasurableSpace Y] {T : X → Y} {μ : MeasureTheory.ProbabilityMeasure X} {ν : MeasureTheory.ProbabilityMeasure Y} (hT : ProbabilityTheory.HasLaw T ↑ν ↑μ) :
      ↑(graph hT) = μ.map fun (x : X) => (x, T x)

      The underlying probability measure of a bundled graph plan is the pushforward of μ along the graph map x ↦ (x, T x).