math / data /lean /OAI /Analysis /Brenier /MapDistance.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
24.2 kB
import OAI.Analysis.Brenier.Basic
namespace OAI
noncomputable section
open MeasureTheory
open scoped ENNReal
namespace Problem358
variable {d : ā„•} {ρ : Measure (E d)} {T S U : E d → E d}
@[simp] theorem mapL2Dist_self (ρ : Measure (E d)) (T : E d → E d) :
mapL2Dist ρ T T = 0 := by
simp [mapL2Dist]
theorem mapL2Dist_nonneg (ρ : Measure (E d)) (T S : E d → E d) :
0 ≤ mapL2Dist ρ T S := Real.sqrt_nonneg _
theorem mapL2Dist_comm (ρ : Measure (E d)) (T S : E d → E d) :
mapL2Dist ρ T S = mapL2Dist ρ S T := by
simp only [mapL2Dist, norm_sub_rev (T _) (S _)]
theorem mapL2Dist_congr_ae {T' S' : E d → E d}
(hT : T =ᵐ[ρ] T') (hS : S =ᵐ[ρ] S') :
mapL2Dist ρ T S = mapL2Dist ρ T' S' := by
unfold mapL2Dist
congr 1
apply integral_congr_ae
filter_upwards [hT, hS] with x hx hy
rw [hx, hy]
theorem mapL2Dist_eq_zero_of_ae_eq (h : T =ᵐ[ρ] S) :
mapL2Dist ρ T S = 0 := by
rw [mapL2Dist_congr_ae h (Filter.EventuallyEq.refl _ _), mapL2Dist_self]
theorem mapL2Dist_sq (ρ : Measure (E d)) (T S : E d → E d) :
mapL2Dist ρ T S ^ 2 = ∫ x, ‖T x - S x‖ ^ 2 āˆ‚Ļ := by
exact Real.sq_sqrt (integral_nonneg fun x => sq_nonneg _)
theorem mapL2Dist_eq_zero_iff
(hInt : Integrable (fun x => ‖T x - S x‖ ^ 2) ρ) :
mapL2Dist ρ T S = 0 ↔ T =ᵐ[ρ] S := by
constructor
Ā· intro h
have hIntegral : (∫ x, ‖T x - S x‖ ^ 2 āˆ‚Ļ) = 0 := by
rw [← mapL2Dist_sq, h]
simp
have ha := (integral_eq_zero_iff_of_nonneg (fun x => sq_nonneg _) hInt).mp hIntegral
filter_upwards [ha] with x hx
simpa only [Pi.zero_apply, sq_eq_zero_iff, norm_eq_zero, sub_eq_zero] using hx
Ā· exact mapL2Dist_eq_zero_of_ae_eq
theorem quadraticPlanCost_map_pair (hT : Measurable T) (hS : Measurable S) :
quadraticPlanCost (Measure.map (fun x => (T x, S x)) ρ) =
∫⁻ x, ENNReal.ofReal (‖T x - S x‖ ^ 2) āˆ‚Ļ := by
unfold quadraticPlanCost
exact lintegral_map (by fun_prop) (hT.prodMk hS)
theorem mapL2Dist_eq_sqrt_pair_cost (hT : Measurable T) (hS : Measurable S) :
mapL2Dist ρ T S = Real.sqrt
(quadraticPlanCost (Measure.map (fun x => (T x, S x)) ρ)).toReal := by
rw [mapL2Dist, quadraticPlanCost_map_pair hT hS]
congr 1
apply integral_eq_lintegral_of_nonneg_ae
Ā· exact ae_of_all _ fun x => sq_nonneg _
Ā· fun_prop
theorem mapL2Dist_eq_lpNorm (hT : AEStronglyMeasurable T ρ)
(hS : AEStronglyMeasurable S ρ) :
mapL2Dist ρ T S = lpNorm (T - S) 2 ρ := by
rw [lpNorm_eq_integral_norm_rpow_toReal (by norm_num) (by norm_num) (hT.sub hS)]
simp [mapL2Dist, Real.sqrt_eq_rpow]
theorem mapL2Dist_eq_dist_toLp (hT : MemLp T 2 ρ) (hS : MemLp S 2 ρ) :
mapL2Dist ρ T S = dist (hT.toLp T) (hS.toLp S) := by
rw [Lp.dist_edist, Lp.edist_toLp_toLp, toReal_eLpNorm]
exact mapL2Dist_eq_lpNorm hT.aestronglyMeasurable hS.aestronglyMeasurable
theorem mapL2Dist_triangle (hT : MemLp T 2 ρ) (hS : MemLp S 2 ρ)
(hU : MemLp U 2 ρ) :
mapL2Dist ρ T U ≤ mapL2Dist ρ T S + mapL2Dist ρ S U := by
rw [mapL2Dist_eq_dist_toLp hT hU, mapL2Dist_eq_dist_toLp hT hS,
mapL2Dist_eq_dist_toLp hS hU]
exact dist_triangle _ _ _
end Problem358
namespace Problem358
variable {X V : Type*} [MeasurableSpace X] [NormedAddCommGroup V]
[MeasurableSpace V] [BorelSpace V] [SecondCountableTopology V]
/-- A bounded nonnegative squared separation is integrable against a finite measure. -/
theorem integrable_norm_sub_sq_of_ae_bound {ρ : Measure X} [IsFiniteMeasure ρ]
{T S : X → V} (hT : Measurable T) (hS : Measurable S)
{R : ā„} (hbound : āˆ€įµ x āˆ‚Ļ, ‖T x - S x‖ ≤ R) :
Integrable (fun x => ‖T x - S x‖ ^ 2) ρ := by
refine (integrable_const (R ^ 2)).mono' ?_ ?_
Ā· exact ((hT.sub hS).norm.pow_const 2).aestronglyMeasurable
Ā· filter_upwards [hbound] with x hx
rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)]
exact pow_le_pow_leftā‚€ (norm_nonneg _) hx 2
omit [NormedAddCommGroup V] [BorelSpace V] [SecondCountableTopology V] in
/-- Support of a pushforward pulls back to an almost-everywhere range condition. -/
theorem ae_mem_of_map_compl_eq_zero {ρ : Measure X} {T : X → V}
(hT : Measurable T) {Y : Set V} (hY : (Measure.map T ρ) Yᶜ = 0) :
āˆ€įµ x āˆ‚Ļ, T x ∈ Y := by
apply ae_of_ae_map hT.aemeasurable
exact ae_iff.mpr hY
/-- Two measurable maps with essentially bounded ranges have integrable squared separation. -/
theorem integrable_norm_sub_sq_of_ae_mem_bounded {ρ : Measure X} [IsFiniteMeasure ρ]
{T S : X → V} (hT : Measurable T) (hS : Measurable S)
{Y Z : Set V} (hY : Bornology.IsBounded Y) (hZ : Bornology.IsBounded Z)
(hTY : āˆ€įµ x āˆ‚Ļ, T x ∈ Y) (hSZ : āˆ€įµ x āˆ‚Ļ, S x ∈ Z) :
Integrable (fun x => ‖T x - S x‖ ^ 2) ρ := by
obtain ⟨R, hR⟩ := hY.exists_norm_le
obtain ⟨Q, hQ⟩ := hZ.exists_norm_le
apply integrable_norm_sub_sq_of_ae_bound hT hS (R := R + Q)
filter_upwards [hTY, hSZ] with x hx hy
exact (norm_sub_le _ _).trans (add_le_add (hR _ hx) (hQ _ hy))
/-- Compact support of the two pushforwards suffices for the L² separation integral. -/
theorem integrable_norm_sub_sq_of_map_compact {ρ : Measure X} [IsFiniteMeasure ρ]
{T S : X → V} (hT : Measurable T) (hS : Measurable S)
{Y Z : Set V} (hY : IsCompact Y) (hZ : IsCompact Z)
(hTY : (Measure.map T ρ) Yᶜ = 0) (hSZ : (Measure.map S ρ) Zᶜ = 0) :
Integrable (fun x => ‖T x - S x‖ ^ 2) ρ :=
integrable_norm_sub_sq_of_ae_mem_bounded hT hS hY.isBounded hZ.isBounded
(ae_mem_of_map_compl_eq_zero hT hTY) (ae_mem_of_map_compl_eq_zero hS hSZ)
omit [MeasurableSpace V] [BorelSpace V] [SecondCountableTopology V] in
/-- The squared L² separation integral vanishes exactly for a.e.-equal maps. -/
theorem integral_norm_sub_sq_eq_zero_iff {ρ : Measure X} {T S : X → V}
(hTS : Integrable (fun x => ‖T x - S x‖ ^ 2) ρ) :
(∫ x, ‖T x - S x‖ ^ 2 āˆ‚Ļ) = 0 ↔ T =ᵐ[ρ] S := by
rw [integral_eq_zero_iff_of_nonneg (fun x => sq_nonneg _) hTS]
simp only [Filter.EventuallyEq, Pi.zero_apply, sq_eq_zero_iff, norm_eq_zero, sub_eq_zero]
end Problem358
end
noncomputable section
open MeasureTheory Filter
open scoped Topology ENNReal
namespace Problem358
variable {d : ā„•} {ρ : Measure (E d)}
theorem exists_mapL2Dist_limit {T : ā„• → E d → E d}
(hT : āˆ€ n, MemLp (T n) 2 ρ)
(hC : āˆ€ ε > 0, ∃ N, āˆ€ m ≄ N, āˆ€ n ≄ N,
mapL2Dist ρ (T m) (T n) < ε) :
∃ S : E d → E d, Measurable S ∧ MemLp S 2 ρ ∧
Tendsto (fun n => mapL2Dist ρ (T n) S) atTop (š“ 0) := by
let F : ā„• → Lp (E d) 2 ρ := fun n => (hT n).toLp (T n)
have hCF : CauchySeq F := by
apply Metric.cauchySeq_iff.mpr
intro ε hε
obtain ⟨N, hN⟩ := hC ε hε
refine ⟨N, fun m hm n hn => ?_⟩
simpa only [F, ← mapL2Dist_eq_dist_toLp] using hN m hm n hn
obtain ⟨S, hS⟩ := cauchySeq_tendsto_of_complete hCF
refine ⟨S, (Lp.stronglyMeasurable S).measurable, (Lp.memLp S), ?_⟩
have hDist := tendsto_iff_dist_tendsto_zero.mp hS
simpa only [mapL2Dist_eq_dist_toLp (hT _) (Lp.memLp S), Lp.toLp_coeFn, F]
using hDist
theorem exists_subseq_tendsto_ae_of_mapL2Dist_tendsto_zero
{T : ā„• → E d → E d} {S : E d → E d}
(hT : āˆ€ n, MemLp (T n) 2 ρ) (hS : MemLp S 2 ρ)
(hlim : Tendsto (fun n => mapL2Dist ρ (T n) S) atTop (š“ 0)) :
∃ ns : ā„• → ā„•, StrictMono ns ∧
āˆ€įµ x āˆ‚Ļ, Tendsto (fun n => T (ns n) x) atTop (š“ (S x)) := by
let F : ā„• → Lp (E d) 2 ρ := fun n => (hT n).toLp (T n)
have hLp : Tendsto F atTop (š“ (hS.toLp S)) := by
apply tendsto_iff_dist_tendsto_zero.mpr
simpa only [F, ← mapL2Dist_eq_dist_toLp] using hlim
obtain ⟨ns, hns, hae⟩ :=
(tendstoInMeasure_of_tendsto_Lp hLp).exists_seq_tendsto_ae
refine ⟨ns, hns, ?_⟩
have hEq : āˆ€įµ x āˆ‚Ļ, āˆ€ n, F n x = T n x := by
exact ae_all_iff.mpr (fun n => (hT n).coeFn_toLp)
filter_upwards [hae, hEq, hS.coeFn_toLp] with x hx hTx hSx
simpa only [hTx, hSx] using hx
theorem ae_mem_of_mapL2Dist_tendsto_zero
{T : ā„• → E d → E d} {S : E d → E d} {Y : Set (E d)}
(hT : āˆ€ n, MemLp (T n) 2 ρ) (hS : MemLp S 2 ρ)
(hlim : Tendsto (fun n => mapL2Dist ρ (T n) S) atTop (š“ 0))
(hY : IsClosed Y) (hmem : āˆ€ n, āˆ€įµ x āˆ‚Ļ, T n x ∈ Y) :
āˆ€įµ x āˆ‚Ļ, S x ∈ Y := by
obtain ⟨ns, _, hns⟩ :=
exists_subseq_tendsto_ae_of_mapL2Dist_tendsto_zero hT hS hlim
have hAll : āˆ€įµ x āˆ‚Ļ, āˆ€ n, T n x ∈ Y := ae_all_iff.mpr hmem
filter_upwards [hns, hAll] with x hx hTx
exact hY.mem_of_tendsto hx (Eventually.of_forall fun n => hTx (ns n))
theorem exists_mapL2Dist_limit_in_closed {T : ā„• → E d → E d} {Y : Set (E d)}
(hT : āˆ€ n, MemLp (T n) 2 ρ)
(hC : āˆ€ ε > 0, ∃ N, āˆ€ m ≄ N, āˆ€ n ≄ N,
mapL2Dist ρ (T m) (T n) < ε)
(hY : IsClosed Y) (hmem : āˆ€ n, āˆ€įµ x āˆ‚Ļ, T n x ∈ Y) :
∃ S : E d → E d, Measurable S ∧ MemLp S 2 ρ ∧
(āˆ€įµ x āˆ‚Ļ, S x ∈ Y) ∧
Tendsto (fun n => mapL2Dist ρ (T n) S) atTop (š“ 0) := by
obtain ⟨S, hSm, hS, hlim⟩ := exists_mapL2Dist_limit hT hC
exact ⟨S, hSm, hS, ae_mem_of_mapL2Dist_tendsto_zero hT hS hlim hY hmem, hlim⟩
/-- Map distance is continuous under L² convergence of each endpoint. -/
theorem tendsto_mapL2Dist_of_tendsto {ι : Type*} {l : Filter ι}
{T S : ι → E d → E d} {Tā‚€ Sā‚€ : E d → E d}
(hT : āˆ€ n, MemLp (T n) 2 ρ) (hS : āˆ€ n, MemLp (S n) 2 ρ)
(hTā‚€ : MemLp Tā‚€ 2 ρ) (hSā‚€ : MemLp Sā‚€ 2 ρ)
(hTlim : Tendsto (fun n => mapL2Dist ρ (T n) Tā‚€) l (š“ 0))
(hSlim : Tendsto (fun n => mapL2Dist ρ (S n) Sā‚€) l (š“ 0)) :
Tendsto (fun n => mapL2Dist ρ (T n) (S n)) l (š“ (mapL2Dist ρ Tā‚€ Sā‚€)) := by
have hTLp : Tendsto (fun n => (hT n).toLp (T n)) l (š“ (hTā‚€.toLp Tā‚€)) := by
apply tendsto_iff_dist_tendsto_zero.mpr
simpa only [← mapL2Dist_eq_dist_toLp] using hTlim
have hSLp : Tendsto (fun n => (hS n).toLp (S n)) l (š“ (hSā‚€.toLp Sā‚€)) := by
apply tendsto_iff_dist_tendsto_zero.mpr
simpa only [← mapL2Dist_eq_dist_toLp] using hSlim
simpa only [← mapL2Dist_eq_dist_toLp] using hTLp.dist hSLp
end Problem358
end
noncomputable section
open MeasureTheory
namespace Problem358
/-- The graph plan of a measurable map remembers its almost-everywhere class. -/
theorem graphPlan_eq_iff_ae_eq {d : ā„•} {ρ : Measure (E d)}
{T S : E d → E d} (hT : Measurable T) (hS : Measurable S) :
graphPlan ρ T = graphPlan ρ S ↔ T =ᵐ[ρ] S := by
constructor
Ā· intro heq
have hgraph : āˆ€įµ p āˆ‚graphPlan ρ T, p.2 = T p.1 := by
apply (ae_map_iff (measurable_id.prodMk hT).aemeasurable
(measurableSet_eq_fun measurable_snd (hT.comp measurable_fst))).2
exact Filter.Eventually.of_forall fun _ => rfl
rw [heq] at hgraph
have hae := ae_of_ae_map (measurable_id.prodMk hS).aemeasurable hgraph
filter_upwards [hae] with x hx
exact hx.symm
Ā· intro hae
apply Measure.map_congr
filter_upwards [hae] with x hx
exact Prod.ext rfl hx
/-- A measurable transport of a probability source defines a coupling with its law. -/
theorem graphPlan_isCoupling {d : ā„•} {ρ μ : Measure (E d)}
[IsProbabilityMeasure ρ] {T : E d → E d}
(hT : Measurable T) (hlaw : Measure.map T ρ = μ) :
IsCoupling ρ μ (graphPlan ρ T) := by
have hm : Measurable (fun x => (x, T x)) := measurable_id.prodMk hT
refine ⟨?_, ?_, ?_⟩
Ā· unfold graphPlan
infer_instance
Ā· rw [graphPlan, Measure.map_map measurable_fst hm]
exact Measure.map_id
Ā· rw [graphPlan, Measure.map_map measurable_snd hm]
exact hlaw
/-- All optimal maps for the same source and target have the same graph cost. -/
theorem IsQuadraticOptimalMap.cost_eq {d : ā„•} {ρ μ : Measure (E d)}
[IsProbabilityMeasure ρ] {T S : E d → E d}
(hT : IsQuadraticOptimalMap ρ μ T) (hS : IsQuadraticOptimalMap ρ μ S) :
quadraticPlanCost (graphPlan ρ T) = quadraticPlanCost (graphPlan ρ S) := by
apply le_antisymm
Ā· exact hT.2.2 _ (graphPlan_isCoupling hS.1 hS.2.1)
Ā· exact hS.2.2 _ (graphPlan_isCoupling hT.1 hT.2.1)
/-- Uniqueness among transport plans implies uniqueness of the map almost everywhere. -/
theorem IsUniqueQuadraticOptimalMap.ae_eq_of_optimal {d : ā„•}
{ρ μ : Measure (E d)} [IsProbabilityMeasure ρ] {T S : E d → E d}
(hT : IsUniqueQuadraticOptimalMap ρ μ T)
(hS : IsQuadraticOptimalMap ρ μ S) : T =ᵐ[ρ] S := by
apply (graphPlan_eq_iff_ae_eq hT.1.1 hS.1).mp
exact (hT.2 _ (graphPlan_isCoupling hS.1 hS.2.1)
(hS.2.2 _ (graphPlan_isCoupling hT.1.1 hT.1.2.1))).symm
/-- Distances between unique optimal maps do not depend on selected representatives. -/
theorem mapL2Dist_eq_of_optimal_maps {d : ā„•} {ρ μ ν : Measure (E d)}
[IsProbabilityMeasure ρ] {T S T' S' : E d → E d}
(hT : IsUniqueQuadraticOptimalMap ρ μ T)
(hS : IsUniqueQuadraticOptimalMap ρ ν S)
(hT' : IsQuadraticOptimalMap ρ μ T') (hS' : IsQuadraticOptimalMap ρ ν S') :
mapL2Dist ρ T S = mapL2Dist ρ T' S' :=
mapL2Dist_congr_ae (hT.ae_eq_of_optimal hT') (hS.ae_eq_of_optimal hS')
/-- Changing a measurable representative on a null set preserves optimality. -/
theorem IsQuadraticOptimalMap.congr_ae {d : ā„•} {ρ μ : Measure (E d)}
{T S : E d → E d} (hT : IsQuadraticOptimalMap ρ μ T)
(hS : Measurable S) (hae : T =ᵐ[ρ] S) : IsQuadraticOptimalMap ρ μ S := by
have hg := (graphPlan_eq_iff_ae_eq hT.1 hS).mpr hae
refine ⟨hS, ?_, ?_⟩
Ā· exact (Measure.map_congr hae).symm.trans hT.2.1
· intro π hπ
rw [← hg]
exact hT.2.2 π hπ
/-- Changing a measurable representative on a null set also preserves plan uniqueness. -/
theorem IsUniqueQuadraticOptimalMap.congr_ae {d : ā„•} {ρ μ : Measure (E d)}
{T S : E d → E d} (hT : IsUniqueQuadraticOptimalMap ρ μ T)
(hS : Measurable S) (hae : T =ᵐ[ρ] S) :
IsUniqueQuadraticOptimalMap ρ μ S := by
have hg := (graphPlan_eq_iff_ae_eq hT.1.1 hS).mpr hae
refine ⟨hT.1.congr_ae hS hae, ?_⟩
intro π hπ hcost
rw [← hg] at hcost ⊢
exact hT.2 π hπ hcost
end Problem358
end
noncomputable section
open Filter
open scoped Topology
namespace Problem358.StabilityLimit
/-- A uniform power bound survives convergence when the input distances have only
an asymptotic upper bound. This is enough for finite-target quantization. -/
theorem real_bound_of_approximation
{D W C α : ā„} {Dā‚™ Wā‚™ ε : ā„• → ā„}
(hC : 0 ≤ C) (hα : 0 ≤ α) (hWā‚™ : āˆ€ n, 0 ≤ Wā‚™ n)
(hD : Tendsto Dā‚™ atTop (š“ D)) (hε : Tendsto ε atTop (š“ 0))
(hupper : āˆ€ n, Wā‚™ n ≤ W + ε n)
(hbound : āˆ€ n, Dā‚™ n ≤ C * Real.rpow (Wā‚™ n) α) :
D ≤ C * Real.rpow W α := by
have hinput : Tendsto (fun n => W + ε n) atTop (š“ W) := by
simpa using tendsto_const_nhds.add hε
have hpower : Tendsto (fun n => C * Real.rpow (W + ε n) α)
atTop (š“ (C * Real.rpow W α)) :=
tendsto_const_nhds.mul ((Real.continuous_rpow_const hα).tendsto W |>.comp hinput)
apply le_of_tendsto_of_tendsto hD hpower
exact Filter.Eventually.of_forall fun n => (hbound n).trans
(mul_le_mul_of_nonneg_left (Real.rpow_le_rpow (hWā‚™ n) (hupper n) hα) hC)
/-- Metric version of the approximation closure step. -/
theorem dist_bound_of_approximation {X : Type*} [PseudoMetricSpace X]
{x y : X} {xā‚™ yā‚™ : ā„• → X} {W C α : ā„} {Wā‚™ ε : ā„• → ā„}
(hC : 0 ≤ C) (hα : 0 ≤ α) (hWā‚™ : āˆ€ n, 0 ≤ Wā‚™ n)
(hx : Tendsto xā‚™ atTop (š“ x)) (hy : Tendsto yā‚™ atTop (š“ y))
(hε : Tendsto ε atTop (š“ 0)) (hupper : āˆ€ n, Wā‚™ n ≤ W + ε n)
(hbound : āˆ€ n, dist (xā‚™ n) (yā‚™ n) ≤ C * Real.rpow (Wā‚™ n) α) :
dist x y ≤ C * Real.rpow W α := by
exact real_bound_of_approximation hC hα hWā‚™ (hx.dist hy) hε hupper hbound
/-- The exact exponent used by the stability target. -/
theorem one_third_dist_bound_of_approximation {X : Type*} [PseudoMetricSpace X]
{x y : X} {xā‚™ yā‚™ : ā„• → X} {W C : ā„} {Wā‚™ ε : ā„• → ā„}
(hC : 0 ≤ C) (hWā‚™ : āˆ€ n, 0 ≤ Wā‚™ n)
(hx : Tendsto xā‚™ atTop (š“ x)) (hy : Tendsto yā‚™ atTop (š“ y))
(hε : Tendsto ε atTop (š“ 0)) (hupper : āˆ€ n, Wā‚™ n ≤ W + ε n)
(hbound : āˆ€ n, dist (xā‚™ n) (yā‚™ n) ≤ C * Real.rpow (Wā‚™ n) (1 / 3 : ā„)) :
dist x y ≤ C * Real.rpow W (1 / 3 : ā„) := by
exact dist_bound_of_approximation hC (by norm_num) hWā‚™ hx hy hε hupper hbound
open MeasureTheory
variable {d : ā„•} {ρ : Measure (E d)}
/-- Strong L² convergence in both arguments gives convergence of the map distance. -/
theorem tendsto_mapL2Dist {T S : E d → E d} {Tā‚™ Sā‚™ : ā„• → E d → E d}
(hT : MemLp T 2 ρ) (hS : MemLp S 2 ρ)
(hTā‚™ : āˆ€ n, MemLp (Tā‚™ n) 2 ρ) (hSā‚™ : āˆ€ n, MemLp (Sā‚™ n) 2 ρ)
(hlimT : Tendsto (fun n => mapL2Dist ρ (Tā‚™ n) T) atTop (š“ 0))
(hlimS : Tendsto (fun n => mapL2Dist ρ (Sā‚™ n) S) atTop (š“ 0)) :
Tendsto (fun n => mapL2Dist ρ (Tā‚™ n) (Sā‚™ n)) atTop (š“ (mapL2Dist ρ T S)) := by
have hTLp : Tendsto (fun n => (hTā‚™ n).toLp (Tā‚™ n)) atTop (š“ (hT.toLp T)) := by
apply tendsto_iff_dist_tendsto_zero.mpr
simpa only [← mapL2Dist_eq_dist_toLp] using hlimT
have hSLp : Tendsto (fun n => (hSā‚™ n).toLp (Sā‚™ n)) atTop (š“ (hS.toLp S)) := by
apply tendsto_iff_dist_tendsto_zero.mpr
simpa only [← mapL2Dist_eq_dist_toLp] using hlimS
simpa only [← mapL2Dist_eq_dist_toLp] using hTLp.dist hSLp
/-- Passage from finite-target map bounds to a strong-L² limiting pair. -/
theorem mapL2Dist_bound_of_approximation
{T S : E d → E d} {Tā‚™ Sā‚™ : ā„• → E d → E d}
{W C α : ā„} {Wā‚™ ε : ā„• → ā„}
(hT : MemLp T 2 ρ) (hS : MemLp S 2 ρ)
(hTā‚™ : āˆ€ n, MemLp (Tā‚™ n) 2 ρ) (hSā‚™ : āˆ€ n, MemLp (Sā‚™ n) 2 ρ)
(hlimT : Tendsto (fun n => mapL2Dist ρ (Tā‚™ n) T) atTop (š“ 0))
(hlimS : Tendsto (fun n => mapL2Dist ρ (Sā‚™ n) S) atTop (š“ 0))
(hC : 0 ≤ C) (hα : 0 ≤ α) (hWā‚™ : āˆ€ n, 0 ≤ Wā‚™ n)
(hε : Tendsto ε atTop (š“ 0)) (hupper : āˆ€ n, Wā‚™ n ≤ W + ε n)
(hbound : āˆ€ n, mapL2Dist ρ (Tā‚™ n) (Sā‚™ n) ≤ C * Real.rpow (Wā‚™ n) α) :
mapL2Dist ρ T S ≤ C * Real.rpow W α := by
exact real_bound_of_approximation hC hα hWā‚™
(tendsto_mapL2Dist hT hS hTā‚™ hSā‚™ hlimT hlimS) hε hupper hbound
/-- Final one-third estimate under explicit finite approximation hypotheses. -/
theorem one_third_bound_of_target_approximation
{T S : E d → E d} {Tā‚™ Sā‚™ : ā„• → E d → E d}
{μ ν : Measure (E d)} {μₙ νₙ : ā„• → Measure (E d)} {C : ā„} {ε : ā„• → ā„}
(hT : MemLp T 2 ρ) (hS : MemLp S 2 ρ)
(hTā‚™ : āˆ€ n, MemLp (Tā‚™ n) 2 ρ) (hSā‚™ : āˆ€ n, MemLp (Sā‚™ n) 2 ρ)
(hlimT : Tendsto (fun n => mapL2Dist ρ (Tā‚™ n) T) atTop (š“ 0))
(hlimS : Tendsto (fun n => mapL2Dist ρ (Sā‚™ n) S) atTop (š“ 0))
(hC : 0 ≤ C) (hε : Tendsto ε atTop (š“ 0))
(hupper : āˆ€ n, wasserstein2 (μₙ n) (νₙ n) ≤ wasserstein2 μ ν + ε n)
(hbound : āˆ€ n, mapL2Dist ρ (Tā‚™ n) (Sā‚™ n) ≤
C * Real.rpow (wasserstein2 (μₙ n) (νₙ n)) (1 / 3 : ā„)) :
mapL2Dist ρ T S ≤ C * Real.rpow (wasserstein2 μ ν) (1 / 3 : ā„) := by
exact mapL2Dist_bound_of_approximation hT hS hTā‚™ hSā‚™ hlimT hlimS hC
(by norm_num) (fun n => Real.sqrt_nonneg _) hε hupper hbound
end Problem358.StabilityLimit
end
noncomputable section
open MeasureTheory
namespace Problem358
/-- On a probability source, an essential pointwise distance bound is an L² bound. -/
theorem mapL2Dist_le_of_ae_bound {d : ā„•} {ρ : Measure (E d)}
[IsProbabilityMeasure ρ] {T S : E d → E d}
(hT : Measurable T) (hS : Measurable S) {M : ā„} (hM : 0 ≤ M)
(hbound : āˆ€įµ x āˆ‚Ļ, ‖T x - S x‖ ≤ M) :
mapL2Dist ρ T S ≤ M := by
apply (Real.sqrt_le_left hM).mpr
have hi := integrable_norm_sub_sq_of_ae_bound hT hS hbound
have hle : (∫ x, ‖T x - S x‖ ^ 2 āˆ‚Ļ) ≤ ∫ _x : E d, M ^ 2 āˆ‚Ļ := by
apply integral_mono_ae hi (integrable_const _)
filter_upwards [hbound] with x hx
exact pow_le_pow_leftā‚€ (norm_nonneg _) hx 2
simpa using hle
/-- Uniform norm bounds on two maps give a uniform L² distance bound. -/
theorem mapL2Dist_le_of_ae_norm_bounds {d : ā„•} {ρ : Measure (E d)}
[IsProbabilityMeasure ρ] {T S : E d → E d}
(hT : Measurable T) (hS : Measurable S) {R Q : ā„}
(hR : 0 ≤ R) (hQ : 0 ≤ Q)
(hRT : āˆ€įµ x āˆ‚Ļ, ‖T x‖ ≤ R) (hQS : āˆ€įµ x āˆ‚Ļ, ‖S x‖ ≤ Q) :
mapL2Dist ρ T S ≤ R + Q := by
apply mapL2Dist_le_of_ae_bound hT hS (add_nonneg hR hQ)
filter_upwards [hRT, hQS] with x hx hy
exact (norm_sub_le _ _).trans (add_le_add hx hy)
/-- The norms of optimal maps are controlled by a bound on the target supports. -/
theorem IsQuadraticOptimalMap.mapL2Dist_le_of_norm_bound {d : ā„•}
{ρ μ ν : Measure (E d)} [IsProbabilityMeasure ρ]
{T S : E d → E d}
(hT : IsQuadraticOptimalMap ρ μ T) (hS : IsQuadraticOptimalMap ρ ν S)
{Y : Set (E d)} (hμ : IsSupported μ Y) (hν : IsSupported ν Y)
{L : ā„} (hL : 0 ≤ L) (hY : āˆ€ y ∈ Y, ‖y‖ ≤ L) :
mapL2Dist ρ T S ≤ 2 * L := by
have hTY : āˆ€įµ x āˆ‚Ļ, T x ∈ Y :=
ae_mem_of_map_compl_eq_zero hT.1 (by simpa [hT.2.1, IsSupported] using hμ)
have hSY : āˆ€įµ x āˆ‚Ļ, S x ∈ Y :=
ae_mem_of_map_compl_eq_zero hS.1 (by simpa [hS.2.1, IsSupported] using hν)
have hRT : āˆ€įµ x āˆ‚Ļ, ‖T x‖ ≤ L := hTY.mono fun x hx => hY _ hx
have hRS : āˆ€įµ x āˆ‚Ļ, ‖S x‖ ≤ L := hSY.mono fun x hx => hY _ hx
simpa [two_mul] using mapL2Dist_le_of_ae_norm_bounds hT.1 hS.1 hL hL hRT hRS
end Problem358
namespace Problem358
/-- Compact support of the pushforwards suffices for separation by map distance. -/
theorem mapL2Dist_eq_zero_iff_ae_of_compact {d : ā„•} {ρ : Measure (E d)}
[IsFiniteMeasure ρ] {T S : E d → E d} (hT : Measurable T) (hS : Measurable S)
{Y Z : Set (E d)} (hY : IsCompact Y) (hZ : IsCompact Z)
(hTY : IsSupported (Measure.map T ρ) Y) (hSZ : IsSupported (Measure.map S ρ) Z) :
mapL2Dist ρ T S = 0 ↔ T =ᵐ[ρ] S :=
mapL2Dist_eq_zero_iff (integrable_norm_sub_sq_of_map_compact hT hS hY hZ hTY hSZ)
/-- Positive map distance is equivalent to distinct a.e. classes under integrability. -/
theorem mapL2Dist_pos_iff_not_ae {d : ā„•} {ρ : Measure (E d)}
{T S : E d → E d} (hTS : Integrable (fun x => ‖T x - S x‖ ^ 2) ρ) :
0 < mapL2Dist ρ T S ↔ ¬ T =ᵐ[ρ] S := by
rw [lt_iff_le_and_ne]
simp only [mapL2Dist_nonneg, true_and, ne_eq, eq_comm (a := (0 : ā„)),
mapL2Dist_eq_zero_iff hTS]
/-- Two unequal target laws force positive map distance for compact-supported maps. -/
theorem mapL2Dist_pos_of_map_ne_of_compact {d : ā„•} {ρ : Measure (E d)}
[IsFiniteMeasure ρ] {T S : E d → E d} (hT : Measurable T) (hS : Measurable S)
{Y Z : Set (E d)} (hY : IsCompact Y) (hZ : IsCompact Z)
(hTY : IsSupported (Measure.map T ρ) Y) (hSZ : IsSupported (Measure.map S ρ) Z)
(hne : Measure.map T ρ ≠ Measure.map S ρ) : 0 < mapL2Dist ρ T S := by
refine lt_of_le_of_ne (mapL2Dist_nonneg ρ T S) ?_
intro hzero
have hae : T =ᵐ[ρ] S :=
(mapL2Dist_eq_zero_iff_ae_of_compact hT hS hY hZ hTY hSZ).mp hzero.symm
exact hne (Measure.map_congr hae)
/-- Optimal maps to distinct compact-supported targets have positive map distance. -/
theorem IsQuadraticOptimalMap.mapL2Dist_pos_of_ne {d : ā„•}
{ρ μ ν : Measure (E d)} [IsFiniteMeasure ρ] {T S : E d → E d}
(hT : IsQuadraticOptimalMap ρ μ T) (hS : IsQuadraticOptimalMap ρ ν S)
{Y Z : Set (E d)} (hY : IsCompact Y) (hZ : IsCompact Z)
(hμ : IsSupported μ Y) (hν : IsSupported ν Z) (hne : μ ≠ ν) :
0 < mapL2Dist ρ T S := by
apply mapL2Dist_pos_of_map_ne_of_compact hT.1 hS.1 hY hZ
· simpa only [hT.2.1] using hμ
· simpa only [hS.2.1] using hν
Ā· simpa only [hT.2.1, hS.2.1] using hne
end Problem358
end
end OAI