math / data /lean /OAI /Probability /FKMaps /Model.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
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