Download data/lean/OAI/Probability/FKMaps/Model.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 9.57 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FKMaps/Model.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/FKMaps/Model.lean
-
curl -L -o Model.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FKMaps/Model.lean
9.57 kB
| import Mathlib | |
| namespace OAI | |
| /-! | |
| Finite FortuinβKasteleyn maps and the Brownian continuum random tree. | |
| All combinatorial maps below have a distinguished dart 0 and are quotiented | |
| by orientation-preserving dart relabellings fixing that dart. A rotation system | |
| with Euler characteristic 2 encodes precisely a connected oriented-sphere map. | |
| No simplicity restriction is imposed. Vertices and edges are rotation and | |
| edge-reversal orbits, respectively. Every edge subset is included in the law. | |
| The index n here represents source size n+1, so the limit is through ALL | |
| positive edge sizes, not a subsequence. | |
| MetricMeasureData packages the actual distance, measurable space and measure, | |
| without using arbitrary representatives of measure-preserving isometry classes | |
| as a global typeclass. Valid objects are compact metric probability spaces. | |
| The GHP extended distance is the infimum over common isometric embeddings, | |
| represented by pseudometrics on the disjoint union; zero cross distances simply | |
| identify points in the common ambient space. Tests are bounded functions | |
| continuous for that distance on valid objects. Thus GHP convergence is written | |
| in its bounded-continuous-test (weak distributional convergence) definition. | |
| A standard normalized Brownian excursion is represented in its standard | |
| three-dimensional Bessel-bridge realization: the norm of three independent | |
| standard Brownian bridges of duration 1. No rescaling of the excursion is used. | |
| -/ | |
| noncomputable section | |
| open Set Filter MeasureTheory ProbabilityTheory | |
| open scoped Topology BigOperators ENNReal NNReal | |
| namespace FKCRT | |
| abbrev Dart (n : β) := Fin (2 * (n + 1)) | |
| abbrev Orbit {n : β} (s : Equiv.Perm (Dart n)) := | |
| Quotient (Equiv.Perm.SameCycle.setoid s) | |
| def orbit {n : β} (s : Equiv.Perm (Dart n)) (d : Dart n) : Orbit s := | |
| Quotient.mk _ d | |
| instance {n : β} (s : Equiv.Perm (Dart n)) : Fintype (Orbit s) := Fintype.ofFinite _ | |
| /-- The spanning graph with precisely the edges in A, with loops omitted only | |
| from adjacency: they still exist as edge orbits, have FK weight, and contribute | |
| two darts to the degree measure. Omitting loops does not change distance or k. -/ | |
| def spanningGraph {n : β} (a s : Equiv.Perm (Dart n)) (A : Set (Orbit a)) : | |
| SimpleGraph (Orbit s) := | |
| SimpleGraph.fromRel fun v w => | |
| β d : Dart n, orbit a d β A β§ orbit s d = v β§ orbit s (a d) = w | |
| /-- Labelled connected orientable genus-zero rotation systems. -/ | |
| def MapConditions {n : β} (P : Equiv.Perm (Dart n) Γ Equiv.Perm (Dart n)) : Prop := | |
| Function.Involutive P.1 β§ (β d, P.1 d β d) β§ | |
| (spanningGraph P.1 P.2 Set.univ).Connected β§ | |
| Nat.card (Orbit P.2) + Nat.card (Orbit (P.2 * P.1)) = n + 3 | |
| abbrev LabelledMap (n : β) := | |
| {P : Equiv.Perm (Dart n) Γ Equiv.Perm (Dart n) // MapConditions P} | |
| /-- Root-preserving isomorphism of oriented maps (both dart permutations intertwine). -/ | |
| def MapIso {n : β} (M N : LabelledMap n) : Prop := | |
| β r : Equiv.Perm (Dart n), r 0 = 0 β§ | |
| (β d, N.val.1 (r d) = r (M.val.1 d)) β§ | |
| (β d, N.val.2 (r d) = r (M.val.2 d)) | |
| abbrev RootedMap (n : β) := Quotient (Relation.EqvGen.setoid (@MapIso n)) | |
| instance (n : β) : Fintype (RootedMap n) := Fintype.ofFinite _ | |
| def reversal {n : β} (M : RootedMap n) : Equiv.Perm (Dart n) := M.out.val.1 | |
| def rotation {n : β} (M : RootedMap n) : Equiv.Perm (Dart n) := M.out.val.2 | |
| abbrev Vertex {n : β} (M : RootedMap n) := Orbit (rotation M) | |
| abbrev Edge {n : β} (M : RootedMap n) := Orbit (reversal M) | |
| def graph {n : β} (M : RootedMap n) (A : Set (Edge M)) : SimpleGraph (Vertex M) := | |
| spanningGraph (reversal M) (rotation M) A | |
| /-- The source k_M(A), including isolated vertices. -/ | |
| def clusterCount {n : β} (M : RootedMap n) (A : Finset (Edge M)) : β := | |
| Nat.card (graph M (A : Set (Edge M))).ConnectedComponent | |
| /-- Exact decorated finite-map weight from eq:finite-law. -/ | |
| def fkWeight {n : β} (q : β) (M : RootedMap n) (A : Finset (Edge M)) : β := | |
| Real.rpow q ((clusterCount M A : β) + | |
| ((A.card : β) - (Nat.card (Vertex M) : β)) / 2) | |
| def partition (q : β) (n : β) : β := | |
| β M : RootedMap n, β A : Finset (Edge M), fkWeight q M A | |
| /-- Unbundled presentation of a measured metric space; validity is specified below. -/ | |
| structure MetricMeasureData where | |
| Carrier : Type | |
| distance : Carrier β Carrier β β | |
| measurableSpace : MeasurableSpace Carrier | |
| mass : @Measure Carrier measurableSpace | |
| /-- Exactly compact metric probability spaces, with their Borel sigma algebras. -/ | |
| def MetricMeasureData.Valid (X : MetricMeasureData) : Prop := | |
| β m : MetricSpace X.Carrier, | |
| letI := m | |
| (β x y, dist x y = X.distance x y) β§ | |
| CompactSpace X.Carrier β§ X.measurableSpace = borel X.Carrier β§ | |
| X.mass Set.univ = 1 | |
| /-- Normalized degree measure is uniform dart mass pushed to vertices. -/ | |
| def degreeMass {n : β} (M : RootedMap n) : | |
| @Measure (Vertex M) β€ := | |
| letI : MeasurableSpace (Vertex M) := β€ | |
| β d : Dart n, ENNReal.ofReal (1 / (2 * (n + 1) : β)) β’ | |
| Measure.dirac (orbit (rotation M) d) | |
| /-- Root and decoration are not included in the metric probability space. -/ | |
| def mapSpace {n : β} (scale : β) (M : RootedMap n) : MetricMeasureData where | |
| Carrier := Vertex M | |
| distance v w := scale * ((graph M Set.univ).dist v w : β) | |
| measurableSpace := β€ | |
| mass := degreeMass M | |
| /-- An ambient pseudometric on the disjoint union giving isometric embeddings. -/ | |
| def Amalgamates (X Y : MetricMeasureData) | |
| (m : PseudoMetricSpace (X.Carrier β Y.Carrier)) : Prop := | |
| letI := m | |
| (β x x', dist (Sum.inl x : X.Carrier β Y.Carrier) (Sum.inl x') = X.distance x x') β§ | |
| (β y y', dist (Sum.inr y : X.Carrier β Y.Carrier) (Sum.inr y') = Y.distance y y') | |
| def ambientCost (X Y : MetricMeasureData) | |
| (m : PseudoMetricSpace (X.Carrier β Y.Carrier)) : ββ₯0β := | |
| letI := m | |
| letI : MeasurableSpace (X.Carrier β Y.Carrier) := borel _ | |
| max (Metric.hausdorffEDist (Set.range (Sum.inl : X.Carrier β X.Carrier β Y.Carrier)) | |
| (Set.range (Sum.inr : Y.Carrier β X.Carrier β Y.Carrier))) | |
| (levyProkhorovEDist | |
| (@Measure.map X.Carrier (X.Carrier β Y.Carrier) X.measurableSpace | |
| (borel _) Sum.inl X.mass) | |
| (@Measure.map Y.Carrier (X.Carrier β Y.Carrier) Y.measurableSpace | |
| (borel _) Sum.inr Y.mass)) | |
| /-- The common-isometric-embedding definition of the source GHP distance. -/ | |
| def ghpEDist (X Y : MetricMeasureData) : ββ₯0β := | |
| β¨ m : {m : PseudoMetricSpace (X.Carrier β Y.Carrier) // Amalgamates X Y m}, | |
| ambientCost X Y m.val | |
| /-- Bounded continuous tests on compact metric probability spaces modulo | |
| measure-preserving isometry, expressed on presentations. -/ | |
| def IsGHPTest (F : MetricMeasureData β β) : Prop := | |
| (β C : β, β X, |F X| β€ C) β§ | |
| β X, X.Valid β β Ξ΅ : β, 0 < Ξ΅ β β Ξ΄ : β, 0 < Ξ΄ β§ | |
| β Y, Y.Valid β ghpEDist X Y < ENNReal.ofReal Ξ΄ β |F Y - F X| < Ξ΅ | |
| /-- Source excursion pseudometric, with the closed interval minimum. -/ | |
| def excursionDist (e : unitInterval β β) (s t : unitInterval) : β := | |
| e s + e t - 2 * sInf (e '' Set.uIcc s t) | |
| abbrev ExcursionTree (e : unitInterval β β) := | |
| Quotient (Relation.EqvGen.setoid (fun s t => excursionDist e s t = 0)) | |
| def treeProjection (e : unitInterval β β) (t : unitInterval) : ExcursionTree e := | |
| Quotient.mk _ t | |
| /-- The quotient by d_e=0, its induced metric, and pushforward of uniform time. | |
| The equivalence closure is redundant for continuous e; the induced distance | |
| is independent of representatives, as required by the pseudometric proof. -/ | |
| def treeSpace (e : unitInterval β β) : MetricMeasureData := | |
| letI : TopologicalSpace (ExcursionTree e) := | |
| TopologicalSpace.coinduced (treeProjection e) inferInstance | |
| letI : MeasurableSpace (ExcursionTree e) := borel _ | |
| { Carrier := ExcursionTree e | |
| distance := fun x y => excursionDist e x.out y.out | |
| measurableSpace := borel _ | |
| mass := Measure.map (treeProjection e) (volume : Measure unitInterval) } | |
| /-- Standard normalized excursion, realized as the 3D Bessel bridge. -/ | |
| def standardExcursion {Ξ© : Type} (B : Fin 3 β ββ₯0 β Ξ© β β) (Ο : Ξ©) | |
| (t : unitInterval) : β := | |
| Real.sqrt (β i : Fin 3, (B i β¨(t : β), t.property.1β© Ο - | |
| (t : β) * B i 1 Ο) ^ 2) | |
| /-- Exact expectation under the finite law, with n+1 edges. -/ | |
| def finiteExpectation (q scale : β) (n : β) (F : MetricMeasureData β β) : β := | |
| β M : RootedMap n, β A : Finset (Edge M), | |
| (fkWeight q M A / partition q n) * F (mapSpace scale M) | |
| def brownianExpectation {Ξ© : Type} [MeasurableSpace Ξ©] (P : Measure Ξ©) | |
| (B : Fin 3 β ββ₯0 β Ξ© β β) (F : MetricMeasureData β β) : β := | |
| β« Ο, F (treeSpace (standardExcursion B Ο)) βP | |
| /-- thm:main. The quantifiers over Brownian realizations express that the limit | |
| is the standard excursion-tree law, not a coupling-specific object. -/ | |
| def MainStatement : Prop := | |
| β q : β, 4 < q β β c : β, 0 < c β§ | |
| β (Ξ© : Type) (mΞ© : MeasurableSpace Ξ©) (P : @Measure Ξ© mΞ©), | |
| @IsProbabilityMeasure Ξ© mΞ© P β | |
| β B : Fin 3 β ββ₯0 β Ξ© β β, | |
| (β i, @IsBrownianReal Ξ© mΞ© (B i) P) β | |
| @iIndepFun Ξ© (Fin 3) mΞ© (fun _ => ββ₯0 β β) (fun _ => inferInstance) | |
| (fun i Ο t => B i t Ο) P β | |
| β F : MetricMeasureData β β, IsGHPTest F β | |
| Tendsto (fun n : β => finiteExpectation q (c / Real.sqrt (n + 1)) n F) | |
| atTop (π (@brownianExpectation Ξ© mΞ© P B F)) | |
| end FKCRT | |
| end | |
| end OAI | |