Download data/lean/ComparatorChallenges/BiholderTransport.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.41 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/ComparatorChallenges/BiholderTransport.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/ComparatorChallenges/BiholderTransport.lean
-
curl -L -o BiholderTransport.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/ComparatorChallenges/BiholderTransport.lean
5.41 kB
| import Mathlib | |
| namespace OAI | |
| noncomputable section | |
| open Set MeasureTheory Manifold Bundle | |
| open scoped ContDiff Manifold ENNReal NNReal Topology | |
| namespace WeakMTWTransport | |
| abbrev Model (n : β) := EuclideanSpace β (Fin n) | |
| section MetricDefinitions | |
| variable {M : Type*} [MetricSpace M] | |
| /-- Squared-distance cost with factor one half. -/ | |
| def cost (x y : M) : β := dist x y ^ 2 / 2 | |
| /-- Calibration of Hausdorff measure to Euclidean volume. -/ | |
| def euclideanVolumeFactor (n : β) : ββ₯0β := | |
| volume (Metric.ball (0 : Model n) 1) / | |
| (Measure.hausdorffMeasure (n : β) : Measure (Model n)) | |
| (Metric.ball (0 : Model n) 1) | |
| variable [MeasurableSpace M] | |
| /-- Riemannian volume calibrated to Lebesgue measure in Euclidean space. -/ | |
| def metricVolume [BorelSpace M] (n : β) : Measure M := | |
| euclideanVolumeFactor n β’ Measure.hausdorffMeasure (n : β) | |
| /-- Almost-everywhere measurable probability densities between fixed bounds. -/ | |
| def AdmissibleDensity (vol : Measure M) (lam cap : β) (rho : M β β) : Prop := | |
| AEMeasurable rho vol β§ Integrable rho vol β§ | |
| (β« x, rho x βvol) = 1 β§ (βα΅ x βvol, lam β€ rho x β§ rho x β€ cap) | |
| /-- Multiplication by a density, ignoring exceptional negative values on null sets. -/ | |
| def densityMeasure (vol : Measure M) (rho : M β β) : Measure M := | |
| vol.withDensity (fun x => ENNReal.ofReal (rho x)) | |
| /-- Optimality for the Monge minimization problem. -/ | |
| def IsOptimalMap (vol : Measure M) (rho0 rho1 : M β β) (T : M β M) : Prop := | |
| Measurable T β§ Measure.map T (densityMeasure vol rho0) = densityMeasure vol rho1 β§ | |
| β S : M β M, Measurable S β | |
| Measure.map S (densityMeasure vol rho0) = densityMeasure vol rho1 β | |
| (β« x, cost x (T x) * rho0 x βvol) β€ | |
| (β« x, cost x (S x) * rho0 x βvol) | |
| /-- The two global estimates have the very same exponent and constant. -/ | |
| def BiHolderEstimate (alpha C : β) (T : M ββ M) : Prop := | |
| (β x x', dist (T x) (T x') β€ C * (dist x x') ^ alpha) β§ | |
| (β y y', dist (T.symm y) (T.symm y') β€ C * (dist y y') ^ alpha) | |
| end MetricDefinitions | |
| section RiemannianDefinitions | |
| variable {n : β} {M : Type*} [MetricSpace M] [ChartedSpace (Model n) M] | |
| [IsManifold π(β, Model n) β M] | |
| [RiemannianBundle (fun x : M => TangentSpace π(β, Model n) x)] | |
| /-- Complete affinely parametrized geodesic with prescribed initial tangent. | |
| Local metric minimization is an intrinsic definition of Riemannian geodesics. -/ | |
| def IsGeodesicWithInitialData (x : M) (v : TangentSpace π(β, Model n) x) | |
| (gamma : β β M) : Prop := | |
| ContMDiff π(β, β) π(β, Model n) β gamma β§ | |
| (β¨gamma 0, mfderiv π(β, β) π(β, Model n) gamma 0 (1 : β)β© : | |
| TangentBundle π(β, Model n) M) = β¨x, vβ© β§ | |
| β t : β, β eps : β, 0 < eps β§ | |
| β s u : β, |s - t| < eps β |u - t| < eps β | |
| dist (gamma s) (gamma u) = |s - u| * βvβ | |
| /-- Evaluation at time one of the geodesic determined by initial data. -/ | |
| def riemannianExp (x : M) (v : TangentSpace π(β, Model n) x) : M := by | |
| classical | |
| exact if h : β gamma, IsGeodesicWithInitialData x v gamma then (Classical.choose h) 1 else x | |
| /-- The open injectivity domain, defined by extendible minimizing vectors. -/ | |
| def injectivityDomain (x : M) : Set (TangentSpace π(β, Model n) x) := | |
| {p | β a : β, 1 < a β§ dist x (riemannianExp x (a β’ p)) = a * βpβ} | |
| /-- The MaβTrudingerβWang fourth derivative with factor -3/2. -/ | |
| def mtw (x : M) (p xi eta : TangentSpace π(β, Model n) x) : β := | |
| -(3 / 2 : β) * | |
| iteratedDeriv 2 (fun s : β => | |
| iteratedDeriv 2 (fun t : β => | |
| cost (riemannianExp x (t β’ xi)) (riemannianExp x (p + s β’ eta))) 0) 0 | |
| /-- Weak MTW only at interior velocities and only for orthogonal test vectors. -/ | |
| def WeakMTW : Prop := | |
| β (x : M) (p : TangentSpace π(β, Model n) x), p β injectivityDomain x β | |
| β xi eta : TangentSpace π(β, Model n) x, | |
| inner β xi eta = 0 β 0 β€ mtw x p xi eta | |
| end RiemannianDefinitions | |
| /-- Uniform bi-HΓΆlder optimal transport for all densities between fixed bounds | |
| on a compact connected smooth Riemannian manifold satisfying weak MTW. -/ | |
| theorem uniform_biHolder_transport | |
| {n : β} (hn : 2 β€ n) {M : Type*} | |
| [MetricSpace M] [CompactSpace M] [ConnectedSpace M] | |
| [ChartedSpace (Model n) M] [IsManifold π(β, Model n) β M] | |
| [RiemannianBundle (fun x : M => TangentSpace π(β, Model n) x)] | |
| [IsContMDiffRiemannianBundle π(β, Model n) β (Model n) | |
| (fun x : M => TangentSpace π(β, Model n) x)] | |
| [IsRiemannianManifold π(β, Model n) M] | |
| [MeasurableSpace M] [BorelSpace M] | |
| (hmtw : WeakMTW (n := n) (M := M)) | |
| (lam cap : β) (hlam : 0 < lam) (hcap : lam β€ cap) | |
| (hclass : β rho : M β β, AdmissibleDensity (metricVolume n) lam cap rho) : | |
| β alpha C : β, 0 < alpha β§ alpha β€ 1 β§ 0 β€ C β§ | |
| β rho0 rho1 : M β β, | |
| AdmissibleDensity (metricVolume n) lam cap rho0 β | |
| AdmissibleDensity (metricVolume n) lam cap rho1 β | |
| β T : M ββ M, | |
| IsOptimalMap (metricVolume n) rho0 rho1 T β§ | |
| (β S : M β M, IsOptimalMap (metricVolume n) rho0 rho1 S β | |
| S =α΅[densityMeasure (metricVolume n) rho0] T) β§ | |
| BiHolderEstimate alpha C T := by | |
| sorry | |
| end WeakMTWTransport | |
| end | |
| end OAI | |