Download data/lean/OAI/Analysis/Brenier/CompactMeasure.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 10.3 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Brenier/CompactMeasure.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Analysis/Brenier/CompactMeasure.lean
-
curl -L -o CompactMeasure.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Analysis/Brenier/CompactMeasure.lean
10.3 kB
| import OAI.Analysis.Brenier.Basic | |
| namespace OAI | |
| noncomputable section | |
| open MeasureTheory | |
| open scoped ENNReal | |
| namespace Problem358 | |
| section General | |
| variable {X F : Type*} [TopologicalSpace X] [T2Space X] | |
| [MeasurableSpace X] [OpensMeasurableSpace X] [NormedAddCommGroup F] | |
| {ΞΌ : Measure X} [IsFiniteMeasure ΞΌ] {K : Set X} {f : X β F} | |
| /-- Continuity only on a compact set of full measure suffices for integrability. -/ | |
| theorem integrable_of_continuousOn_of_ae_mem_compact | |
| (hK : IsCompact K) (hΞΌ : βα΅ x βΞΌ, x β K) (hf : ContinuousOn f K) : | |
| Integrable f ΞΌ := by | |
| have h := hf.integrableOn_compact hK (ΞΌ := ΞΌ) | |
| rw [IntegrableOn, Measure.restrict_eq_self_of_ae_mem hΞΌ] at h | |
| exact h | |
| /-- The preceding result through a measurable pushforward. -/ | |
| theorem integrable_comp_of_continuousOn_of_map_ae_mem_compact | |
| {A : Type*} [MeasurableSpace A] {Ο : Measure A} [IsFiniteMeasure Ο] | |
| {T : A β X} (hT : Measurable T) (hK : IsCompact K) | |
| (hΟ : βα΅ x βMeasure.map T Ο, x β K) (hf : ContinuousOn f K) : | |
| Integrable (fun x => f (T x)) Ο := by | |
| exact (integrable_of_continuousOn_of_ae_mem_compact hK hΟ hf).comp_measurable hT | |
| end General | |
| /-- Continuous-on-support functions are integrable for compactly supported finite measures. -/ | |
| theorem IsSupported.integrable_continuousOn | |
| {d : β} {ΞΌ : Measure (E d)} [IsFiniteMeasure ΞΌ] {K : Set (E d)} | |
| (hΞΌ : IsSupported ΞΌ K) (hK : IsCompact K) | |
| {F : Type*} [NormedAddCommGroup F] {f : E d β F} (hf : ContinuousOn f K) : | |
| Integrable f ΞΌ := by | |
| exact integrable_of_continuousOn_of_ae_mem_compact hK (ae_iff.mpr hΞΌ) hf | |
| /-- A continuous potential on a compact target is integrable after a measurable transport. -/ | |
| theorem integrable_comp_of_supported_map | |
| {d : β} {A : Type*} [MeasurableSpace A] {Ο : Measure A} [IsFiniteMeasure Ο] | |
| {T : A β E d} (hT : Measurable T) {K : Set (E d)} | |
| (hK : IsCompact K) (hΟ : IsSupported (Measure.map T Ο) K) | |
| {F : Type*} [NormedAddCommGroup F] {f : E d β F} (hf : ContinuousOn f K) : | |
| Integrable (fun x => f (T x)) Ο := by | |
| exact (hΟ.integrable_continuousOn hK hf).comp_measurable hT | |
| /-- Every continuous function on the compact product support of a coupling is integrable. -/ | |
| theorem IsCoupling.integrable_continuousOn_prod | |
| {d : β} {ΞΌ Ξ½ : Measure (E d)} {Ο : Measure (E d Γ E d)} | |
| (hΟ : IsCoupling ΞΌ Ξ½ Ο) {K Y : Set (E d)} | |
| (hK : IsCompact K) (hY : IsCompact Y) | |
| (hΞΌ : IsSupported ΞΌ K) (hΞ½ : IsSupported Ξ½ Y) | |
| {F : Type*} [NormedAddCommGroup F] {f : E d Γ E d β F} | |
| (hf : ContinuousOn f (K ΓΛ’ Y)) : Integrable f Ο := by | |
| let : IsProbabilityMeasure Ο := hΟ.1 | |
| have hfst : βα΅ p βΟ, p.1 β K := by | |
| apply ae_of_ae_map measurable_fst.aemeasurable | |
| rw [hΟ.2.1] | |
| exact ae_iff.mpr hΞΌ | |
| have hsnd : βα΅ p βΟ, p.2 β Y := by | |
| apply ae_of_ae_map measurable_snd.aemeasurable | |
| rw [hΟ.2.2] | |
| exact ae_iff.mpr hΞ½ | |
| apply integrable_of_continuousOn_of_ae_mem_compact (hK.prod hY) _ hf | |
| filter_upwards [hfst, hsnd] with p hpK hpY | |
| exact β¨hpK, hpYβ© | |
| end Problem358 | |
| end | |
| noncomputable section | |
| open MeasureTheory Filter | |
| open scoped Topology | |
| namespace Problem358 | |
| namespace CompactIntegrability | |
| variable {d : β} {Ο : Measure (E d)} {T S : E d β E d} | |
| {Y Z : Set (E d)} | |
| /-- A compact-supported pushforward puts the map in that compact set almost everywhere. -/ | |
| theorem ae_mem_of_supported_map (hT : Measurable T) (hY : IsCompact Y) | |
| (hTY : IsSupported (Measure.map T Ο) Y) : βα΅ x βΟ, T x β Y := by | |
| apply (ae_map_iff hT.aemeasurable hY.measurableSet).mp | |
| exact ae_iff.mpr hTY | |
| /-- Every natural moment of the norm of a compact-valued measurable map is integrable. -/ | |
| theorem integrable_norm_pow_of_ae_mem [IsFiniteMeasure Ο] | |
| (hT : Measurable T) (hY : IsCompact Y) (hTY : βα΅ x βΟ, T x β Y) | |
| (n : β) : Integrable (fun x => βT xβ ^ n) Ο := by | |
| obtain β¨R, hRpos, hRβ© := hY.isBounded.exists_pos_norm_le | |
| apply (integrable_const (R ^ n)).mono' (hT.norm.pow_const n).aestronglyMeasurable | |
| filter_upwards [hTY] with x hx | |
| rw [Real.norm_eq_abs, abs_of_nonneg (pow_nonneg (norm_nonneg _) _)] | |
| exact pow_le_pow_leftβ (norm_nonneg _) (hR _ hx) n | |
| /-- Squared norm integrability from compact support of the pushforward. -/ | |
| theorem integrable_norm_sq_of_supported_map [IsFiniteMeasure Ο] | |
| (hT : Measurable T) (hY : IsCompact Y) | |
| (hTY : IsSupported (Measure.map T Ο) Y) : | |
| Integrable (fun x => βT xβ ^ 2) Ο := | |
| integrable_norm_pow_of_ae_mem hT hY (ae_mem_of_supported_map hT hY hTY) 2 | |
| /-- An almost-everywhere limit of maps into a fixed compact set stays in that set. -/ | |
| theorem ae_mem_of_ae_tendsto {F : β β E d β E d} | |
| (hY : IsCompact Y) (hFY : β n, βα΅ x βΟ, F n x β Y) | |
| (hlim : βα΅ x βΟ, Filter.Tendsto (fun n => F n x) Filter.atTop (π (T x))) : | |
| βα΅ x βΟ, T x β Y := by | |
| have hmem : βα΅ x βΟ, β n, F n x β Y := ae_all_iff.mpr hFY | |
| filter_upwards [hmem, hlim] with x hx hlimx | |
| exact hY.isClosed.mem_of_tendsto hlimx (Filter.Eventually.of_forall hx) | |
| /-- Compact range supplies the domination needed to pass to continuous test integrals. -/ | |
| theorem tendsto_integral_comp_of_ae_tendsto [IsFiniteMeasure Ο] | |
| {F : β β E d β E d} (hF : β n, Measurable (F n)) | |
| (hY : IsCompact Y) (hFY : β n, βα΅ x βΟ, F n x β Y) | |
| (hlim : βα΅ x βΟ, Filter.Tendsto (fun n => F n x) Filter.atTop (π (T x))) | |
| {Ο : E d β β} (hΟ : Continuous Ο) : | |
| Filter.Tendsto (fun n => β« x, Ο (F n x) βΟ) Filter.atTop | |
| (π (β« x, Ο (T x) βΟ)) := by | |
| obtain β¨R, _, hRβ© := (hY.image hΟ).isBounded.exists_pos_norm_le | |
| apply tendsto_integral_of_dominated_convergence (fun _ => R) | |
| Β· intro n | |
| exact (hΟ.measurable.comp (hF n)).aestronglyMeasurable | |
| Β· exact integrable_const R | |
| Β· intro n | |
| filter_upwards [hFY n] with x hx | |
| exact hR _ β¨F n x, hx, rflβ© | |
| Β· filter_upwards [hlim] with x hx | |
| exact hΟ.continuousAt.tendsto.comp hx | |
| /-- Almost-everywhere convergence within a common compact range implies convergence of | |
| squared map distances. This is the bounded-convergence step in finite-target approximation. -/ | |
| theorem tendsto_integral_sub_norm_sq_of_ae_tendsto [IsFiniteMeasure Ο] | |
| {F : β β E d β E d} (hF : β n, Measurable (F n)) (hT : Measurable T) | |
| (hY : IsCompact Y) (hFY : β n, βα΅ x βΟ, F n x β Y) | |
| (hlim : βα΅ x βΟ, Filter.Tendsto (fun n => F n x) Filter.atTop (π (T x))) : | |
| Filter.Tendsto (fun n => β« x, βF n x - T xβ ^ 2 βΟ) Filter.atTop (π 0) := by | |
| have hTY := ae_mem_of_ae_tendsto hY hFY hlim | |
| obtain β¨R, hRpos, hRβ© := hY.isBounded.exists_pos_norm_le | |
| have hdom := tendsto_integral_of_dominated_convergence (ΞΌ := Ο) | |
| (F := fun n x => βF n x - T xβ ^ 2) (f := fun _ => (0 : β)) | |
| (fun _ => (2 * R) ^ 2) | |
| apply (by simpa using hdom : _) | |
| Β· intro n | |
| exact ((hF n).sub hT).norm.pow_const 2 |>.aestronglyMeasurable | |
| Β· exact integrable_const _ | |
| Β· intro n | |
| filter_upwards [hFY n, hTY] with x hx hxT | |
| apply (sq_le_sqβ (norm_nonneg _) (by positivity)).mpr | |
| calc | |
| βF n x - T xβ β€ βF n xβ + βT xβ := norm_sub_le _ _ | |
| _ β€ R + R := add_le_add (hR _ hx) (hR _ hxT) | |
| _ = 2 * R := by ring | |
| Β· filter_upwards [hlim] with x hx | |
| have hc : Tendsto (fun _ : β => T x) atTop (π (T x)) := tendsto_const_nhds | |
| simpa using (hx.sub hc).norm.pow 2 | |
| /-- Compact-range bounded convergence stated using the problem's exact map distance. -/ | |
| theorem tendsto_mapL2Dist_of_ae_tendsto [IsFiniteMeasure Ο] | |
| {F : β β E d β E d} (hF : β n, Measurable (F n)) (hT : Measurable T) | |
| (hY : IsCompact Y) (hFY : β n, βα΅ x βΟ, F n x β Y) | |
| (hlim : βα΅ x βΟ, Filter.Tendsto (fun n => F n x) Filter.atTop (π (T x))) : | |
| Filter.Tendsto (fun n => mapL2Dist Ο (F n) T) Filter.atTop (π 0) := by | |
| have h := tendsto_integral_sub_norm_sq_of_ae_tendsto hF hT hY hFY hlim | |
| simpa [mapL2Dist, Function.comp_def] using (Real.continuous_sqrt.tendsto 0).comp h | |
| end CompactIntegrability | |
| namespace CompactIntegrability | |
| variable {d : β} {Ο ΞΌ : Measure (E d)} {Y : Set (E d)} | |
| {F Q : β β E d β E d} {T : E d β E d} | |
| /-- Identify a compact-range pointwise limit's law by continuous test integrals. -/ | |
| theorem map_eq_of_ae_tendsto_of_test_tendsto [IsFiniteMeasure Ο] [IsFiniteMeasure ΞΌ] | |
| (hF : β n, Measurable (F n)) (hT : Measurable T) | |
| (hY : IsCompact Y) (hFY : β n, βα΅ x βΟ, F n x β Y) | |
| (hlim : βα΅ x βΟ, Tendsto (fun n => F n x) atTop (π (T x))) | |
| (htest : β Ο : E d β β, Continuous Ο β | |
| Tendsto (fun n => β« x, Ο (F n x) βΟ) atTop (π (β« y, Ο y βΞΌ))) : | |
| Measure.map T Ο = ΞΌ := by | |
| apply Measure.ext_of_integral_eq_on_compactlySupported | |
| intro Ο | |
| have hΟ : Continuous (Ο : E d β β) := map_continuous Ο | |
| rw [integral_map hT.aemeasurable hΟ.measurable.aestronglyMeasurable] | |
| exact tendsto_nhds_unique | |
| (tendsto_integral_comp_of_ae_tendsto hF hY hFY hlim hΟ) (htest Ο hΟ) | |
| /-- If the approximating maps have the laws of quantizers converging to the identity, | |
| the almost-everywhere limit has the original target law. -/ | |
| theorem map_eq_of_ae_tendsto_of_map_eq_quantizers [IsFiniteMeasure Ο] [IsFiniteMeasure ΞΌ] | |
| (hF : β n, Measurable (F n)) (hT : Measurable T) | |
| (hQ : β n, Measurable (Q n)) (hY : IsCompact Y) | |
| (hFY : β n, βα΅ x βΟ, F n x β Y) | |
| (hQY : β n, βα΅ y βΞΌ, Q n y β Y) | |
| (hlim : βα΅ x βΟ, Tendsto (fun n => F n x) atTop (π (T x))) | |
| (hQlim : βα΅ y βΞΌ, Tendsto (fun n => Q n y) atTop (π y)) | |
| (hpush : β n, Measure.map (F n) Ο = Measure.map (Q n) ΞΌ) : | |
| Measure.map T Ο = ΞΌ := by | |
| apply map_eq_of_ae_tendsto_of_test_tendsto hF hT hY hFY hlim | |
| intro Ο hΟ | |
| have htest := tendsto_integral_comp_of_ae_tendsto hQ hY hQY hQlim hΟ | |
| have heq : (fun n => β« x, Ο (F n x) βΟ) = (fun n => β« y, Ο (Q n y) βΞΌ) := by | |
| funext n | |
| rw [β integral_map (hF n).aemeasurable hΟ.measurable.aestronglyMeasurable, | |
| hpush n, integral_map (hQ n).aemeasurable hΟ.measurable.aestronglyMeasurable] | |
| rw [heq] | |
| exact htest | |
| end CompactIntegrability | |
| end Problem358 | |
| end | |
| end OAI | |