← Existence And Smoothness Of The Navier–Stokes Equation (navier_stokes_existence_and_smoothness_R3)
Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_IntervalExchange.lean
qedmarket’s copy of theproofnetwork/open-problems@860a535, 1 Dec 2026original source ↗
/-From Prove2Me, definition `IntervalExchange` (https://prove2.me/definitions/42e61c5c-f0f9-4ee7-86a6-ca2ac16f76b5). Apache-2.0 per Prove2Me's terms.-/import Mathlibimport Prove2Me.Definitions.Def_Garrido_Amenabilityimport Prove2Me.Definitions.Def_ThompsonAmenability /-!# Interval exchange transformations, extensive amenability and recurrence K. Juschenko, N. Matte Bon, N. Monod and M. de la Salle, *Extensive amenability and anapplication to interval exchanges*, arXiv:1503.04977v1 (JMMS); K. Juschenko and M. de la Salle,*Invariant means for the wobbling group*, arXiv:1301.4736v4 (JdlS); C. Garban, *Inverted orbitsof exclusion processes, diffuse-extensive-amenability and (non-?)amenability of the intervalexchanges*, arXiv:1804.01981v4; R. Lyons and Y. Peres, *Probability on Trees and Networks*, §2.6. Conventions:- The circle is `UnitAddCircle = ℝ/ℤ`; permutations act by `Equiv.Perm.applyMulAction`.- A measure on a group is a finitely supported `μ : G →₀ ℝ` where the source says "finitely supported", and a function `μ : G → ℝ` otherwise; expectations over random walks are `tsum`s over the sequences of steps.- Random walks: `h : Fin n → G` lists the steps `h_1, …, h_n` as `h 0, …, h (n-1)`; the left random walk is `g_k = h_k ⋯ h_1`.- Probabilities of events of a Markov chain with transition function `P` are `tsum`s.-/ namespace IntervalExchange open scoped ENNReal /-! ## Interval exchange transformations (JMMS pp. 4, 17) -/ /-- JMMS p. 4: `g` is right-continuous at every point of `ℝ/ℤ`. -/def IsRightContinuous (g : UnitAddCircle → UnitAddCircle) : Prop := ∀ x : UnitAddCircle, ContinuousWithinAt (fun t : ℝ => g (x + (t : UnitAddCircle))) (Set.Ici 0) 0 /-- JMMS p. 4: the set of angles `{g x - x : x ∈ ℝ/ℤ}` of `g`. -/def angles (g : UnitAddCircle → UnitAddCircle) : Set UnitAddCircle := Set.range fun x => g x - x /-- JMMS p. 4: an interval exchange transformation, a permutation of `ℝ/ℤ` obtained by cuttingthe circle into finitely many intervals and reordering them: a right-continuous permutation withfinitely many angles and finitely many points of discontinuity. -/def IsIntervalExchange (g : Equiv.Perm UnitAddCircle) : Prop := IsRightContinuous g ∧ (angles g).Finite ∧ {x | ¬ ContinuousAt g x}.Finite /-- JMMS p. 4: the group `IET`, here the subgroup of permutations of `ℝ/ℤ` generated by theinterval exchange transformations. -/def IET : Subgroup (Equiv.Perm UnitAddCircle) := Subgroup.closure {g | IsIntervalExchange g} /-- JMMS p. 4: the group of angles `Λ(G)` of `G`, the subgroup of `ℝ/ℤ` generated by theincrements `g x - x` for `g ∈ G` and `x ∈ ℝ/ℤ`. -/def angleGroup (G : Subgroup (Equiv.Perm UnitAddCircle)) : AddSubgroup UnitAddCircle := AddSubgroup.closure {a | ∃ g ∈ G, ∃ x, a = g x - x} /-- JMMS Definition 1.7: the rational rank of a subgroup `Λ` of `ℝ/ℤ`, the supremum of all `d`such that `ℤ^d` embeds in `Λ`. -/noncomputable def rationalRank (Λ : AddSubgroup UnitAddCircle) : ℕ∞ := ⨆ (d : ℕ) (_ : ∃ f : (Fin d → ℤ) →+ Λ, Function.Injective f), (d : ℕ∞) /-- The permutations of `ℝ/ℤ` all of whose increments `g x - x` lie in `Λ`. -/def anglesIn (Λ : AddSubgroup UnitAddCircle) : Subgroup (Equiv.Perm UnitAddCircle) where carrier := {g | ∀ x, g x - x ∈ Λ} one_mem' := by intro x; simp mul_mem' := by intro g h hg hh x have := Λ.add_mem (hg (h x)) (hh x) simpa [Equiv.Perm.mul_apply, sub_add_sub_cancel] using this inv_mem' := by intro g hg x have := Λ.neg_mem (hg (g⁻¹ x)) simpa [neg_sub] using this /-- JMMS p. 17: `IET(Λ)`, the subgroup of all `g ∈ IET` such that the angle `g x - x` is in `Λ`for every `x ∈ ℝ/ℤ`. -/def IETOf (Λ : AddSubgroup UnitAddCircle) : Subgroup (Equiv.Perm UnitAddCircle) := IET ⊓ anglesIn Λ /-- JMMS p. 5: the rotation `x ↦ x + a` of `ℝ/ℤ`. -/def rotation (a : UnitAddCircle) : Equiv.Perm UnitAddCircle := Equiv.addRight a /-! ## Amenable and extensively amenable actions (JMMS pp. 1, 6) -/ section Actions variable (G X : Type*) [Group G] [MulAction G X] /-- JMMS p. 1: the action of `G` on `X` is amenable when there is a `G`-invariant mean on `X`,here a `G`-invariant finitely additive probability measure on all subsets of `X`. -/def IsAmenableAction : Prop := ∃ m : Set X → ℝ≥0∞, Garrido.IsFinitelyAdditiveMeasure m ∧ m Set.univ = 1 ∧ Garrido.IsInvariant G m /-- JMMS Definition 1.1: the action of `G` on `X` is extensively amenable. -/def IsExtensivelyAmenable : Prop := ThompsonAmenability.IsExtensivelyAmenableOn G X Set.univ end Actions /-! ## Functors from finite sets to amenable groups (JMMS pp. 2–3, §3) -/ section Functors open CategoryTheory CategoryTheory.Limits universe u /-- The injective maps between finite sets. -/def injectiveMaps : MorphismProperty FintypeCat.{u} := fun _ _ f => Function.Injective f instance : injectiveMaps.{u}.IsMultiplicative where id_mem X := fun a b h => h comp_mem f g hf hg := by intro a b h exact hf (hg h) /-- JMMS p. 2: the category `I` of finite sets whose morphisms are injective maps. -/abbrev FinInj : Type (u + 1) := WideSubcategory injectiveMaps.{u} /-- JMMS p. 2: a functor `I → Amen`, here a functor to groups whose values are amenable. -/def IsAmenableValued (F : FinInj.{u} ⥤ GrpCat.{u}) : Prop := ∀ A, Garrido.IsAmenable (F.obj A) /-- A finite subset of `X`, as an object of `I`. -/abbrev finsetObj {X : Type u} (A : Finset X) : FinInj.{u} := ⟨FintypeCat.of A⟩ /-- The morphism of `I` induced by an injective map `f : X ↪ Y` from a finite subset `A` of `X`to a finite subset of `Y` containing `f '' A`. -/def finsetMap {X Y : Type u} (f : X ↪ Y) {A : Finset X} {B : Finset Y} (h : A.map f ⊆ B) : finsetObj A ⟶ finsetObj B := ⟨FintypeCat.homMk fun a => ⟨f a, h (Finset.mem_map_of_mem f a.2)⟩, by intro a b hab have := congrArg Subtype.val hab exact Subtype.ext (f.injective this)⟩ lemma finsetMap_apply {X Y : Type u} (f : X ↪ Y) {A : Finset X} {B : Finset Y} (h : A.map f ⊆ B) (a : A) : ((finsetMap f h).hom a : Y) = f a := rfl /-- The finite subsets of `X`, ordered by inclusion, as a diagram in `I`. -/def finsetDiagram (X : Type u) : Finset X ⥤ FinInj.{u} where obj A := finsetObj A map {A B} i := finsetMap (Function.Embedding.refl X) (by simpa using leOfHom i) map_id A := by ext a; rfl map_comp f g := by ext a; rfl /-- JMMS p. 2: the extension `F(X)` of a functor `F : I → Amen` to an arbitrary set `X`, thedirect limit of the groups `F(A)` over the finite subsets `A` of `X`. -/noncomputable def extend (F : FinInj.{u} ⥤ GrpCat.{u}) (X : Type u) : GrpCat.{u} := GrpCat.FilteredColimits.colimit.{u, u} (finsetDiagram X ⋙ F) /-- The structure maps `F(A) → F(X)`. -/noncomputable def extendι (F : FinInj.{u} ⥤ GrpCat.{u}) {X : Type u} (A : Finset X) : F.obj (finsetObj A) ⟶ extend F X := (GrpCat.FilteredColimits.colimitCocone.{u, u} (finsetDiagram X ⋙ F)).ι.app A /-- Two structure maps into `F(X)` agree on the image of `F(A)`, wherever `A` is sent. -/lemma map_finsetMap_comp_extendι (F : FinInj.{u} ⥤ GrpCat.{u}) {X Y : Type u} (f : X ↪ Y) {A : Finset X} {B B' : Finset Y} (h : A.map f ⊆ B) (h' : A.map f ⊆ B') : F.map (finsetMap f h) ≫ extendι F B = F.map (finsetMap f h') ≫ extendι F B' := by classical have hB : B ⊆ B ∪ B' := Finset.subset_union_left have hB' : B' ⊆ B ∪ B' := Finset.subset_union_right have w := (GrpCat.FilteredColimits.colimitCocone.{u, u} (finsetDiagram Y ⋙ F)).w (homOfLE hB) have w' := (GrpCat.FilteredColimits.colimitCocone.{u, u} (finsetDiagram Y ⋙ F)).w (homOfLE hB') change F.map _ ≫ extendι F _ = extendι F _ at w w' have e : finsetMap f h ≫ (finsetDiagram Y).map (homOfLE hB) = finsetMap f h' ≫ (finsetDiagram Y).map (homOfLE hB') := by ext a; rfl rw [← w, ← w', ← Category.assoc, ← Category.assoc] erw [← F.map_comp, ← F.map_comp, e] /-- The morphism `F(X) → F(Y)` induced by an injective map `f : X ↪ Y`. -/noncomputable def extendMap (F : FinInj.{u} ⥤ GrpCat.{u}) {X Y : Type u} (f : X ↪ Y) : extend F X ⟶ extend F Y := (GrpCat.FilteredColimits.colimitCoconeIsColimit.{u, u} (finsetDiagram X ⋙ F)).desc { pt := extend F Y ι := { app := fun A => F.map (finsetMap f (subset_refl (A.map f))) ≫ extendι F (A.map f) naturality := by intro A B i have hAB : A.map f ⊆ B.map f := Finset.map_subset_map.2 (leOfHom i) have e : (finsetDiagram X).map i ≫ finsetMap f (subset_refl (B.map f)) = finsetMap f hAB := by ext a; rfl change F.map _ ≫ F.map _ ≫ extendι F _ = (F.map _ ≫ extendι F _) ≫ 𝟙 _ rw [Category.comp_id, ← Category.assoc] erw [← F.map_comp, e] exact map_finsetMap_comp_extendι F f _ _ } } lemma extendι_extendMap (F : FinInj.{u} ⥤ GrpCat.{u}) {X Y : Type u} (f : X ↪ Y) (A : Finset X) : extendι F A ≫ extendMap F f = F.map (finsetMap f (subset_refl (A.map f))) ≫ extendι F (A.map f) := (GrpCat.FilteredColimits.colimitCoconeIsColimit.{u, u} (finsetDiagram X ⋙ F)).fac _ A lemma extend_hom_ext (F : FinInj.{u} ⥤ GrpCat.{u}) {X : Type u} {Z : GrpCat.{u}} {φ ψ : extend F X ⟶ Z} (h : ∀ A : Finset X, extendι F A ≫ φ = extendι F A ≫ ψ) : φ = ψ := (GrpCat.FilteredColimits.colimitCoconeIsColimit.{u, u} (finsetDiagram X ⋙ F)).hom_ext h lemma extendMap_refl (F : FinInj.{u} ⥤ GrpCat.{u}) (X : Type u) : extendMap F (Function.Embedding.refl X) = 𝟙 _ := by apply extend_hom_ext intro A have h : A.map (Function.Embedding.refl X) ⊆ A := by simp have e : finsetMap (Function.Embedding.refl X) h = 𝟙 _ := by ext a; rfl rw [extendι_extendMap, Category.comp_id, map_finsetMap_comp_extendι F _ _ h, e, F.map_id, Category.id_comp] lemma extendMap_trans (F : FinInj.{u} ⥤ GrpCat.{u}) {X Y Z : Type u} (f : X ↪ Y) (g : Y ↪ Z) : extendMap F (f.trans g) = extendMap F f ≫ extendMap F g := by apply extend_hom_ext intro A have h : A.map (f.trans g) ⊆ (A.map f).map g := by simp [Finset.map_map] have e : finsetMap f (subset_refl (A.map f)) ≫ finsetMap g (subset_refl ((A.map f).map g)) = finsetMap (f.trans g) h := by ext a; rfl rw [extendι_extendMap, ← Category.assoc, extendι_extendMap, Category.assoc, extendι_extendMap, ← Category.assoc, ← F.map_comp, e] exact map_finsetMap_comp_extendι F _ _ _ /-- The automorphisms of `F(X)` induced by an action of `G` on `X`. -/noncomputable def extendAut (F : FinInj.{u} ⥤ GrpCat.{u}) (G : Type*) [Group G] (X : Type u) [MulAction G X] : G →* MulAut (extend F X) where toFun g := { toFun := (extendMap F (MulAction.toPerm g : Equiv.Perm X).toEmbedding).hom invFun := (extendMap F (MulAction.toPerm g⁻¹ : Equiv.Perm X).toEmbedding).hom left_inv := fun a => by have e : (MulAction.toPerm g : Equiv.Perm X).toEmbedding.trans (MulAction.toPerm g⁻¹ : Equiv.Perm X).toEmbedding = Function.Embedding.refl X := by ext x; simp [smul_smul] have := congrArg (fun φ => φ.hom a) (extendMap_trans F (MulAction.toPerm g : Equiv.Perm X).toEmbedding (MulAction.toPerm g⁻¹ : Equiv.Perm X).toEmbedding) simp only [e, extendMap_refl, GrpCat.hom_id, GrpCat.hom_comp] at this exact this.symm right_inv := fun a => by have e : (MulAction.toPerm g⁻¹ : Equiv.Perm X).toEmbedding.trans (MulAction.toPerm g : Equiv.Perm X).toEmbedding = Function.Embedding.refl X := by ext x; simp [smul_smul] have := congrArg (fun φ => φ.hom a) (extendMap_trans F (MulAction.toPerm g⁻¹ : Equiv.Perm X).toEmbedding (MulAction.toPerm g : Equiv.Perm X).toEmbedding) simp only [e, extendMap_refl, GrpCat.hom_id, GrpCat.hom_comp] at this exact this.symm map_mul' := map_mul _ } map_one' := by ext a have e : (MulAction.toPerm (1 : G) : Equiv.Perm X).toEmbedding = Function.Embedding.refl X := by ext x; simp simp [e, extendMap_refl] map_mul' g h := by ext a have e : (MulAction.toPerm (g * h) : Equiv.Perm X).toEmbedding = (MulAction.toPerm h : Equiv.Perm X).toEmbedding.trans (MulAction.toPerm g : Equiv.Perm X).toEmbedding := by ext x; simp [mul_smul] show (extendMap F (MulAction.toPerm (g * h) : Equiv.Perm X).toEmbedding).hom a = _ rw [e, extendMap_trans] rfl /-- JMMS p. 2: the semidirect product `F(X) ⋊ G` for an action of `G` on `X`. -/abbrev FunctorProduct (F : FinInj.{u} ⥤ GrpCat.{u}) (G : Type*) [Group G] (X : Type u) [MulAction G X] := SemidirectProduct (extend F X) G (extendAut F G X) /-- JMMS p. 2: the action of `F(X) ⋊ G` on `F(X)`, identified with the coset space`(F(X) ⋊ G)/G`: `(a, g) · b = a · g(b)`. -/noncomputable instance functorProductAction (F : FinInj.{u} ⥤ GrpCat.{u}) (G : Type*) [Group G] (X : Type u) [MulAction G X] : MulAction (FunctorProduct F G X) (extend F X) where smul p b := p.left * extendAut F G X p.right b one_smul b := by show (1 : FunctorProduct F G X).left * _ = b simp mul_smul p q b := by show (p * q).left * extendAut F G X (p * q).right b = p.left * extendAut F G X p.right (q.left * extendAut F G X q.right b) simp [SemidirectProduct.mul_left, SemidirectProduct.mul_right, map_mul, mul_assoc] /-- JMMS p. 3 and Definition 3.6: `F` is tight on `X` when for every `x ∈ X` the morphism`F(X ∖ {x}) → F(X)` induced by inclusion is not onto. -/def IsTight (F : FinInj.{u} ⥤ GrpCat.{u}) (X : Type u) : Prop := ∀ x : X, ¬ Function.Surjective (extendMap F (Function.Embedding.subtype fun y => y ≠ x)).hom end Functors /-! ## Random walks and Markov chains (JMMS §4) -/ section Walks variable {G X : Type*} [Group G] [MulAction G X] /-- A measure `μ` on `G` is symmetric when `μ (g⁻¹) = μ g` for all `g`. -/def IsSymmetric (μ : G →₀ ℝ) : Prop := ∀ g, μ g⁻¹ = μ g /-- JMMS p. 5: `μ` is non-degenerate when its support generates `G`. -/def IsNondegenerate (μ : G →₀ ℝ) : Prop := Subgroup.closure (μ.support : Set G) = ⊤ /-- The expectation `E F(h_1, …, h_n)` for independent steps `h_i` of law `μ`. -/noncomputable def walkExp (μ : G → ℝ) (n : ℕ) (F : (Fin n → G) → ℝ) : ℝ := ∑' h : Fin n → G, (∏ i, μ (h i)) * F h /-- The probability that the steps `(h_1, …, h_n)` lie in the event `A`. -/noncomputable def walkProb (μ : G → ℝ) (n : ℕ) (A : Set (Fin n → G)) : ℝ := walkExp μ n (A.indicator fun _ => 1) /-- JMMS p. 14: the left random walk `g_k = h_k ⋯ h_1`, `g_0 = 1`. -/def walkPos {n : ℕ} (h : Fin n → G) (k : ℕ) : G := (((List.finRange n).filter fun i => i.val < k).map h).reverse.prod /-- JMMS p. 14, (1): the inverted orbit `O_n = {x₀, g₁⁻¹ x₀, …, g_n⁻¹ x₀}`. -/noncomputable def invertedOrbit [DecidableEq X] (x₀ : X) {n : ℕ} (h : Fin n → G) : Finset X := (Finset.range (n + 1)).image fun k => (walkPos h k)⁻¹ • x₀ /-- The transition function of the Markov chain on `X` induced by a measure `μ` on `G`: from `x`the chain moves to `g • x` with probability `μ g`. -/noncomputable def walkKernel (μ : G → ℝ) (x y : X) : ℝ := open Classical in ∑' g, if g • x = y then μ g else 0 /-- For a Markov chain with transition function `P` started at `x₀`: the probability of beingat `y` at time `k ≥ 1` without having visited `x₀` at the times `1, …, k`. -/noncomputable def avoidProb {V : Type*} (P : V → V → ℝ) (x₀ : V) : ℕ → V → ℝ | 0, _ => 0 | 1, y => open Classical in if y = x₀ then 0 else P x₀ y | k + 2, y => open Classical in if y = x₀ then 0 else ∑' z, avoidProb P x₀ (k + 1) z * P z y /-- The probability that the chain started at `x₀` first returns to `x₀` at time `n + 1`. -/noncomputable def firstReturnProb {V : Type*} (P : V → V → ℝ) (x₀ : V) : ℕ → ℝ | 0 => P x₀ x₀ | k + 1 => ∑' z, avoidProb P x₀ (k + 1) z * P z x₀ /-- The chain with transition function `P` started at `x₀` is recurrent: it returns to `x₀`with probability `1`. -/def IsRecurrentChain {V : Type*} (P : V → V → ℝ) (x₀ : V) : Prop := HasSum (firstReturnProb P x₀) 1 /-- JMMS p. 16: the action of `G` on `X` is recurrent when for every symmetric, finitelysupported probability measure `μ` on `G` and every `x₀ ∈ X`, the random walk `(g_n x₀)` on theorbit of `x₀` induced by the left random walk on `G` is recurrent. -/def IsRecurrentAction (G X : Type*) [Group G] [MulAction G X] : Prop := ∀ μ : G →₀ ℝ, ThompsonAmenability.IsProbability μ → IsSymmetric μ → ∀ x₀ : X, IsRecurrentChain (walkKernel (μ : G → ℝ)) x₀ /-- The `n`-step transition probabilities `P^n(x, y)` of a Markov chain. -/noncomputable def stepProb {V : Type*} (P : V → V → ℝ) : ℕ → V → V → ℝ | 0, x, y => open Classical in if y = x then 1 else 0 | n + 1, x, y => ∑' z, stepProb P n x z * P z y /-- JMMS p. 5: the random walk `(G, μ)` has non-trivial Poisson–Furstenberg boundary: somebounded `μ`-harmonic function on `G` is not constant. -/def HasNontrivialBoundary (μ : G →₀ ℝ) : Prop := ∃ f : G → ℝ, (∃ C, ∀ g, |f g| ≤ C) ∧ ThompsonAmenability.IsHarmonicOn μ Set.univ f ∧ ∃ g h, f g ≠ f h end Walks /-! ## Schreier graphs (JMMS p. 5) -/ section Schreier variable {G X : Type*} [Group G] [MulAction G X] /-- The ball of radius `n` about `x₀` in the orbital Schreier graph `Γ(G, X, S)`: the points`s_k ⋯ s_1 x₀` with `k ≤ n` and every `s_i ∈ S`. -/def schreierBall (S : Set G) (x₀ : X) (n : ℕ) : Set X := {y | ∃ l : List G, l.length ≤ n ∧ (∀ s ∈ l, s ∈ S) ∧ y = l.prod • x₀} /-- JMMS p. 6: the Schreier graph `Γ(G, X, S)` grows polynomially: the balls about a point`x₀` have at most `C (n + 1)^d` elements. -/def HasPolynomialGrowth (S : Set G) (x₀ : X) : Prop := ∃ C d : ℕ, ∀ n : ℕ, (schreierBall S x₀ n).ncard ≤ C * (n + 1) ^ d ∧ (schreierBall S x₀ n).Finite end Schreier /-! ## Lamplighter actions and wobbling groups (JMMS p. 2, JdlS pp. 1–2, Garban p. 2) -/ section Lamplighter variable (G X : Type*) [Group G] [MulAction G X] /-- `G` acts on the finitely supported configurations `X → ℤ/2ℤ` by translating them. -/noncomputable def lampAut : G →* MulAut (Multiplicative (X →₀ ZMod 2)) where toFun g := { toFun := fun f => Multiplicative.ofAdd (Finsupp.mapDomain (fun x => g • x) (Multiplicative.toAdd f)) invFun := fun f => Multiplicative.ofAdd (Finsupp.mapDomain (fun x => g⁻¹ • x) (Multiplicative.toAdd f)) left_inv := fun f => by simp only [toAdd_ofAdd] rw [← Finsupp.mapDomain_comp] simp only [Function.comp_def, smul_smul, inv_mul_cancel, one_smul] rw [show (fun x : X => x) = id from rfl, Finsupp.mapDomain_id]; rfl right_inv := fun f => by simp only [toAdd_ofAdd] rw [← Finsupp.mapDomain_comp] simp only [Function.comp_def, smul_smul, mul_inv_cancel, one_smul] rw [show (fun x : X => x) = id from rfl, Finsupp.mapDomain_id]; rfl map_mul' := fun f f' => by simp [Finsupp.mapDomain_add] } map_one' := by ext f x simp only [one_smul, MulEquiv.coe_mk, Equiv.coe_fn_mk, toAdd_ofAdd, MulAut.one_apply] rw [show (fun x : X => x) = id from rfl, Finsupp.mapDomain_id] map_mul' g g' := by ext f x simp only [MulEquiv.coe_mk, Equiv.coe_fn_mk, MulAut.mul_apply, toAdd_ofAdd] rw [← Finsupp.mapDomain_comp] simp [Function.comp_def, mul_smul] /-- JMMS p. 2: the permutational wreath product, or lamplighter group, `(ℤ/2ℤ)^(X) ⋊ G`. -/abbrev Lamplighter := SemidirectProduct (Multiplicative (X →₀ ZMod 2)) G (lampAut G X) /-- JMMS p. 2: the affine action of the lamplighter group on the lamp group `(ℤ/2ℤ)^(X)`,`(f, g) · f' = f + g f'`. -/noncomputable instance lampAction : MulAction (Lamplighter G X) (Multiplicative (X →₀ ZMod 2)) where smul p f := p.left * lampAut G X p.right f one_smul f := by show (1 : Lamplighter G X).left * _ = f simp mul_smul p q f := by show (p * q).left * lampAut G X (p * q).right f = p.left * lampAut G X p.right (q.left * lampAut G X q.right f) simp [SemidirectProduct.mul_left, SemidirectProduct.mul_right, map_mul, mul_assoc] /-- JdlS p. 1 and Garban Definition 1.2: the wobbling group `W(X)` of a metric space, thepermutations `g` of `X` with `sup_x d(x, g x) < ∞`. -/def wobbling (X : Type*) [PseudoMetricSpace X] : Subgroup (Equiv.Perm X) where carrier := {g | ∃ C : ℝ, ∀ x, dist (g x) x ≤ C} one_mem' := ⟨0, fun x => by simp⟩ mul_mem' := by rintro g h ⟨C, hC⟩ ⟨D, hD⟩ refine ⟨C + D, fun x => ?_⟩ calc dist ((g * h) x) x ≤ dist (g (h x)) (h x) + dist (h x) x := dist_triangle _ _ _ _ ≤ C + D := add_le_add (hC _) (hD _) inv_mem' := by rintro g ⟨C, hC⟩ refine ⟨C, fun x => ?_⟩ have := hC (g⁻¹ x) simpa [dist_comm] using this end Lamplighter /-! ## Metric spaces with bounded geometry (JdlS pp. 1–2) -/ section Metric variable (X : Type*) [PseudoMetricSpace X] /-- JdlS p. 1: `X` has bounded geometry: for every `R > 0` the balls of radius `R` have boundedcardinality. -/def HasBoundedGeometry : Prop := ∀ R : ℝ, 0 < R → ∃ N : ℕ, ∀ x : X, (Metric.closedBall x R).Finite ∧ (Metric.closedBall x R).ncard ≤ N /-- JdlS Definition 1.3: the random walk on `X` jumping from a point `x` uniformly to`B(x, R)`. -/noncomputable def ballKernel (R : ℝ) (x y : X) : ℝ := open Classical in if y ∈ Metric.closedBall x R then ((Metric.closedBall x R).ncard : ℝ)⁻¹ else 0 /-- JdlS Definition 1.3: `X` is transient if there is `R > 0` such that the random walk startingat `x₀` and jumping from a point `x` uniformly to `B(x, R)` is transient, and recurrentotherwise. -/def IsRecurrentSpace (x₀ : X) : Prop := ∀ R : ℝ, 0 < R → IsRecurrentChain (ballKernel X R) x₀ /-- JdlS p. 2: `X` embeds coarsely in the metric space `Y`: there is a map `f : X → Y` andfunctions `ρ₋ ≤ ρ₊` with `ρ₋ t → ∞` as `t → ∞` such that`ρ₋ (d(x, y)) ≤ d(f x, f y) ≤ ρ₊ (d(x, y))` for all `x, y`. -/def CoarselyEmbedsIn (Y : Type*) [PseudoMetricSpace Y] : Prop := ∃ (f : X → Y) (ρm ρp : ℝ → ℝ), Filter.Tendsto ρm Filter.atTop Filter.atTop ∧ ∀ x y, ρm (dist x y) ≤ dist (f x) (f y) ∧ dist (f x) (f y) ≤ ρp (dist x y) /-- The infinite (rooted) binary tree: its vertices are the finite binary words, and the distancebetween two words is the length of the path between them through their longest common prefix. -/def binaryTreeDist (u v : List Bool) : ℕ := u.length + v.length - 2 * ((u.zip v).takeWhile fun p => p.1 = p.2).length /-- JdlS p. 2: `X` contains a Lipschitz and injective image of the infinite binary tree. -/def ContainsLipschitzBinaryTree : Prop := ∃ (f : List Bool → X) (C : ℝ), Function.Injective f ∧ ∀ u v, dist (f u) (f v) ≤ C * binaryTreeDist u v end Metric /-! ## Networks and rough embeddings (Lyons–Peres §2.6) -/ section Networks variable {V V' : Type*} /-- Lyons–Peres §2.1 and §2.6: a network on the vertex set `V`, given by its conductances`c x y`: nonnegative, symmetric, with `0 < ∑_y c(x, y) < ∞` at every vertex (2.6), andconnected. -/def IsNetwork (c : V → V → ℝ) : Prop := (∀ x y, 0 ≤ c x y) ∧ (∀ x y, c x y = c y x) ∧ (∀ x, ∃ y, 0 < c x y) ∧ (∀ x, Summable (c x)) ∧ ∀ x y, Relation.ReflTransGen (fun a b => 0 < c a b) x y /-- The random walk on a network: from `x` it moves to `y` with probability`c(x, y) / ∑_z c(x, z)`. -/noncomputable def networkWalk (c : V → V → ℝ) (x y : V) : ℝ := c x y / ∑' z, c x z /-- A connected network is transient when its random walk is transient: started at somevertex, it fails to return there with positive probability. -/def IsTransientNetwork (c : V → V → ℝ) : Prop := ∃ a, ¬ IsRecurrentChain (networkWalk c) a /-- The oriented edges `(v_i, v_{i+1})` traversed by a path `v_0, …, v_k`. -/def pathEdges (p : List V) : List (V × V) := p.zip p.tail /-- Lyons–Peres p. 44: `φ` is a rough embedding of the network `c` on `V` into the network `c'`on `V'`, with constants `α, β` and edge paths `Φ`: (i) for every edge `⟨x, y⟩` of `c`, `Φ x y` isa nonempty simple oriented path of edges of `c'` from `φ x` to `φ y` whose resistances sum to atmost `α r(x, y)`, and `Φ y x` is its reverse; (ii) every edge of `c'` lies in the image of atmost `β` edges of `c`. Resistances are `r = 1 / c`; edges are the pairs `x ≠ y` with`c x y > 0`. -/def IsRoughEmbedding (c : V → V → ℝ) (c' : V' → V' → ℝ) (φ : V → V') : Prop := ∃ (α : ℝ) (β : ℕ) (Φ : V → V → List V'), (∀ x y, x ≠ y → 0 < c x y → 2 ≤ (Φ x y).length ∧ (Φ x y).head? = some (φ x) ∧ (Φ x y).getLast? = some (φ y) ∧ (Φ x y).Nodup ∧ (∀ e ∈ pathEdges (Φ x y), 0 < c' e.1 e.2) ∧ ((pathEdges (Φ x y)).map fun e => 1 / c' e.1 e.2).sum ≤ α * (1 / c x y) ∧ Φ y x = (Φ x y).reverse) ∧ ∀ u v, 0 < c' u v → {p : V × V | p.1 ≠ p.2 ∧ 0 < c p.1 p.2 ∧ (u, v) ∈ pathEdges (Φ p.1 p.2)}.ncard ≤ β ∧ {p : V × V | p.1 ≠ p.2 ∧ 0 < c p.1 p.2 ∧ (u, v) ∈ pathEdges (Φ p.1 p.2)}.Finite end Networks end IntervalExchange