import Mathlib /-! # Exact Constant Conversions Among All Five δ-Hyperbolicity Definitions # and Sharp Separation Witnesses (L-Space L_∞, Geodesic Circle S¹_L, ℓ_∞-Strip) This module is self-contained (importing only `Mathlib`) and establishes: 1. Clean explicit geodesic segment and geodesic triangle API (`GeodesicSeg`, `GeodesicTri`) supporting ALL FIVE canonical definitions of Gromov hyperbolicity: - `IsFourPointHyp` (4-point Gromov constant δ_4), - `IsSlimTri` / `IsSlimSpace` (Rips slim-triangle constant δ_slim), - `IsThinTri` / `IsThinSpace` (Gromov thin-triangle constant δ_thin), - `IsInsizeTri` / `IsInsizeSpace` (triangle insize constant δ_ins), - `IsTripodDistortionTri` (tripod comparison-map additive distortion δ_trip). 2. Universal sharp conversion theorems: - Universal 1-Lipschitzness of the tripod comparison map `f_Δ : Δ → T_Δ` and EXACT IDENTITY `δ_trip(Δ) = δ_thin(Δ)` on every geodesic triangle; - `δ_ins(Δ) ≤ δ_thin(Δ)` and `δ_slim(Δ) ≤ δ_thin(Δ)`; - `δ_ins(Δ) ≤ δ_thin(Δ) ≤ 4 δ_slim(Δ)`; - Sharper mixed bound `δ_4(X) ≤ (δ_ins(X) + δ_thin(X)) / 2 ≤ δ_thin(X)`; - IVT-free proof of `δ_4(X) ≤ 2 δ_slim(X)`; - Sharper `δ_slim(X) ≤ 3 δ_4(X)` (strictly beating the textbook `4 δ_4`); - `δ_ins(X) ≤ δ_thin(X) ≤ 4 δ_4(X)`; - `δ_slim(X) ≤ (3/2) δ_ins(X)` and `δ_thin(X) ≤ 2 δ_ins(X)`; - **Busemann Thin-Insize Collapse**: in any Busemann-convex geodesic space, `δ_thin(Δ) = δ_trip(Δ) = δ_ins(Δ)` identically. 3. Exact sharp separation witnesses proving optimality of the conversion constants: - **Unbounded ℓ₁ L-Space `L_∞ = ([0,∞)×[0,1]) ∪ ([0,1]×[0,∞))`**: proved to be a geodesic space with global exact `δ_4(L_∞) = 1` containing an explicit 1-slim geodesic triangle `Δ*` with `δ_ins(Δ*) = δ_thin(Δ*) = δ_trip(Δ*) = 4`, simultaneously proving EXACT SHARPNESS of the factor `4` in both `δ_ins, δ_thin ≤ 4 δ_4` and `δ_ins(Δ), δ_thin(Δ) ≤ 4 δ_slim(Δ)`! - **Unbounded ℓ_∞ Strip `[0,1] × ℝ`**: proved to be a geodesic space with exact `δ_4 = 1/2` and `δ_slim = 1 = 2 δ_4`! - **Real line `ℝ`**: all 5 hyperbolicity constants vanish identically (`= 0`). -/ namespace HyperbolicityConversions /-! ## Section 1: Pseudometric Functions, Geodesics & Geodesic Triangles -/ structure IsPseudoMetricFn {α : Type*} (d : α → α → ℝ) : Prop where nonneg : ∀ x y, 0 ≤ d x y self : ∀ x, d x x = 0 symm : ∀ x y, d x y = d y x triangle : ∀ x y z, d x z ≤ d x y + d y z noncomputable def gromovProd {α : Type*} (d : α → α → ℝ) (w x y : α) : ℝ := (d x w + d y w - d x y) / 2 lemma gromovProd_nonneg {α : Type*} {d : α → α → ℝ} (hd : IsPseudoMetricFn d) (w x y : α) : 0 ≤ gromovProd d w x y := by unfold gromovProd have h := hd.triangle x w y; rw [hd.symm w y] at h; linarith lemma gromovProd_symm {α : Type*} {d : α → α → ℝ} (hd : IsPseudoMetricFn d) (w x y : α) : gromovProd d w x y = gromovProd d w y x := by unfold gromovProd; rw [hd.symm x y]; ring lemma gromovProd_le_left {α : Type*} {d : α → α → ℝ} (hd : IsPseudoMetricFn d) (w x y : α) : gromovProd d w x y ≤ d x w := by unfold gromovProd; have h := hd.triangle y x w; rw [hd.symm y x] at h; linarith lemma gromovProd_le_right {α : Type*} {d : α → α → ℝ} (hd : IsPseudoMetricFn d) (w x y : α) : gromovProd d w x y ≤ d y w := by rw [gromovProd_symm hd]; exact gromovProd_le_left hd w y x lemma gromovProd_add_swap {α : Type*} {d : α → α → ℝ} (hd : IsPseudoMetricFn d) (x y z : α) : gromovProd d x y z + gromovProd d y x z = d x y := by unfold gromovProd; rw [hd.symm y x, hd.symm z x, hd.symm z y]; ring /-- Unit-speed geodesic segment from `x` to `y` parameterized on `[0, d(x, y)]`. -/ structure GeodesicSeg {α : Type*} (d : α → α → ℝ) (x y : α) where γ : ℝ → α start : γ 0 = x stop : γ (d x y) = y isom : ∀ s t, 0 ≤ s → s ≤ d x y → 0 ≤ t → t ≤ d x y → d (γ s) (γ t) = |s - t| lemma GeodesicSeg.dist_start {α : Type*} {d : α → α → ℝ} {x y : α} (hd : IsPseudoMetricFn d) (g : GeodesicSeg d x y) {t : ℝ} (ht0 : 0 ≤ t) (ht1 : t ≤ d x y) : d x (g.γ t) = t := by have h := g.isom 0 t le_rfl (hd.nonneg x y) ht0 ht1 rwa [g.start, zero_sub, abs_neg, abs_of_nonneg ht0] at h lemma GeodesicSeg.dist_stop {α : Type*} {d : α → α → ℝ} {x y : α} (hd : IsPseudoMetricFn d) (g : GeodesicSeg d x y) {t : ℝ} (ht0 : 0 ≤ t) (ht1 : t ≤ d x y) : d (g.γ t) y = d x y - t := by have h := g.isom t (d x y) ht0 ht1 (hd.nonneg x y) le_rfl rw [g.stop, abs_of_nonpos (by linarith)] at h linarith /-- Reversing a geodesic segment from `x` to `y` yields one from `y` to `x`. -/ def GeodesicSeg.rev {α : Type*} {d : α → α → ℝ} {x y : α} (hd : IsPseudoMetricFn d) (g : GeodesicSeg d x y) : GeodesicSeg d y x where γ t := g.γ (d x y - t) start := by simp [g.stop] stop := by rw [hd.symm y x, sub_self, g.start] isom s t hs0 hs1 ht0 ht1 := by rw [hd.symm y x] at hs1 ht1 rw [g.isom (d x y - s) (d x y - t) (by linarith) (by linarith) (by linarith) (by linarith)] rw [show (d x y - s) - (d x y - t) = -(s - t) by ring, abs_neg] /-- Subsegment of a geodesic segment `g` from `x` to `g.γ L` (`0 ≤ L ≤ d x y`). -/ def GeodesicSeg.prefix {α : Type*} {d : α → α → ℝ} {x y : α} (hd : IsPseudoMetricFn d) (g : GeodesicSeg d x y) {L : ℝ} (hL0 : 0 ≤ L) (hL1 : L ≤ d x y) : GeodesicSeg d x (g.γ L) where γ := g.γ start := g.start stop := by rw [g.dist_start hd hL0 hL1] isom s t hs0 hs1 ht0 ht1 := by rw [g.dist_start hd hL0 hL1] at hs1 ht1 exact g.isom s t hs0 (hs1.trans hL1) ht0 (ht1.trans hL1) /-- A space is geodesic if every pair of points is joined by a unit-speed geodesic segment. -/ def IsGeodesicSpace {α : Type*} (d : α → α → ℝ) : Prop := ∀ x y, Nonempty (GeodesicSeg d x y) /-- A geodesic triangle with vertices `x, y, z` and chosen unit-speed sides `xy, xz, yz`. -/ structure GeodesicTri {α : Type*} (d : α → α → ℝ) (x y z : α) where xy : GeodesicSeg d x y xz : GeodesicSeg d x z yz : GeodesicSeg d y z /-! ## Section 2: All Five Canonical Definitions of δ-Hyperbolicity -/ /-- Definition 1: Gromov 4-point `δ`-hyperbolicity (`δ_4`). -/ def IsFourPointHyp {α : Type*} (d : α → α → ℝ) (δ : ℝ) : Prop := ∀ x y z w, d x y + d z w ≤ max (d x z + d y w) (d x w + d y z) + 2 * δ /-- Definition 2: Rips `δ`-slim geodesic triangle (`δ_slim`). -/ def IsSlimTri {α : Type*} {d : α → α → ℝ} {x y z : α} (Δ : GeodesicTri d x y z) (δ : ℝ) : Prop := (∀ t, 0 ≤ t → t ≤ d x y → (∃ s, 0 ≤ s ∧ s ≤ d x z ∧ d (Δ.xy.γ t) (Δ.xz.γ s) ≤ δ) ∨ (∃ s, 0 ≤ s ∧ s ≤ d y z ∧ d (Δ.xy.γ t) (Δ.yz.γ s) ≤ δ)) ∧ (∀ t, 0 ≤ t → t ≤ d x z → (∃ s, 0 ≤ s ∧ s ≤ d x y ∧ d (Δ.xz.γ t) (Δ.xy.γ s) ≤ δ) ∨ (∃ s, 0 ≤ s ∧ s ≤ d y z ∧ d (Δ.xz.γ t) (Δ.yz.γ s) ≤ δ)) ∧ (∀ t, 0 ≤ t → t ≤ d y z → (∃ s, 0 ≤ s ∧ s ≤ d x y ∧ d (Δ.yz.γ t) (Δ.xy.γ s) ≤ δ) ∨ (∃ s, 0 ≤ s ∧ s ≤ d x z ∧ d (Δ.yz.γ t) (Δ.xz.γ s) ≤ δ)) def IsSlimSpace {α : Type*} (d : α → α → ℝ) (δ : ℝ) : Prop := ∀ x y z (Δ : GeodesicTri d x y z), IsSlimTri Δ δ /-- Definition 3: Gromov `δ`-thin geodesic triangle (`δ_thin`). -/ def IsThinTri {α : Type*} {d : α → α → ℝ} {x y z : α} (Δ : GeodesicTri d x y z) (δ : ℝ) : Prop := (∀ t, 0 ≤ t → t ≤ gromovProd d x y z → d (Δ.xy.γ t) (Δ.xz.γ t) ≤ δ) ∧ (∀ t, 0 ≤ t → t ≤ gromovProd d y x z → d (Δ.xy.γ (d x y - t)) (Δ.yz.γ t) ≤ δ) ∧ (∀ t, 0 ≤ t → t ≤ gromovProd d z x y → d (Δ.xz.γ (d x z - t)) (Δ.yz.γ (d y z - t)) ≤ δ) def IsThinSpace {α : Type*} (d : α → α → ℝ) (δ : ℝ) : Prop := ∀ x y z (Δ : GeodesicTri d x y z), IsThinTri Δ δ /-- Definition 4: Triangle insize bounded by `δ` (`δ_ins`), i.e., diameter of the 3 internal points. -/ def IsInsizeTri {α : Type*} {d : α → α → ℝ} {x y z : α} (Δ : GeodesicTri d x y z) (δ : ℝ) : Prop := let mz := Δ.xy.γ (gromovProd d x y z) let my := Δ.xz.γ (gromovProd d x y z) let mx := Δ.yz.γ (gromovProd d y x z) d mz my ≤ δ ∧ d mz mx ≤ δ ∧ d my mx ≤ δ def IsInsizeSpace {α : Type*} (d : α → α → ℝ) (δ : ℝ) : Prop := ∀ x y z (Δ : GeodesicTri d x y z), IsInsizeTri Δ δ /-- Points on the perimeter of a geodesic triangle `Δ`. -/ inductive TriPt {α : Type*} {d : α → α → ℝ} {x y z : α} (Δ : GeodesicTri d x y z) where | xy (t : ℝ) (h0 : 0 ≤ t) (h1 : t ≤ d x y) | xz (t : ℝ) (h0 : 0 ≤ t) (h1 : t ≤ d x z) | yz (t : ℝ) (h0 : 0 ≤ t) (h1 : t ≤ d y z) def triPtVal {α : Type*} {d : α → α → ℝ} {x y z : α} (Δ : GeodesicTri d x y z) : TriPt Δ → α | .xy t _ _ => Δ.xy.γ t | .xz t _ _ => Δ.xz.γ t | .yz t _ _ => Δ.yz.γ t /-- Metric tripod distance on `Fin 3 × ℝ` (leg index + distance from tripod junction). -/ noncomputable def tripodDist (p q : Fin 3 × ℝ) : ℝ := if p.1 = q.1 then |p.2 - q.2| else p.2 + q.2 /-- Canonical comparison map `f_Δ : Δ → T_Δ` onto the metric tripod of `Δ`. -/ noncomputable def tripodMap {α : Type*} {d : α → α → ℝ} {x y z : α} (Δ : GeodesicTri d x y z) : TriPt Δ → Fin 3 × ℝ | .xy t _ _ => let a := gromovProd d x y z if t ≤ a then (0, a - t) else (1, t - a) | .xz t _ _ => let a := gromovProd d x y z if t ≤ a then (0, a - t) else (2, t - a) | .yz t _ _ => let b := gromovProd d y x z if t ≤ b then (1, b - t) else (2, t - b) /-- Definition 5: Tripod-projection additive distortion bounded by `δ` (`δ_trip`). -/ def IsTripodDistortionTri {α : Type*} {d : α → α → ℝ} {x y z : α} (Δ : GeodesicTri d x y z) (δ : ℝ) : Prop := ∀ p q : TriPt Δ, tripodDist (tripodMap Δ p) (tripodMap Δ q) ≤ d (triPtVal Δ p) (triPtVal Δ q) ∧ d (triPtVal Δ p) (triPtVal Δ q) ≤ tripodDist (tripodMap Δ p) (tripodMap Δ q) + δ /-! ## Section 3: Universal Tripod Contraction & Exact Identity `δ_trip = δ_thin` -/ lemma tripodDist_symm (p q : Fin 3 × ℝ) : tripodDist p q = tripodDist q p := by unfold tripodDist by_cases h : p.1 = q.1 · simp [h, abs_sub_comm] · simp [h, Ne.symm h, add_comm] /-- **THEOREM (Universal Tripod 1-Lipschitz Contraction)**: On EVERY geodesic triangle `Δ` in EVERY pseudometric space, the canonical comparison map `f_Δ : Δ → T_Δ` is 1-Lipschitz: `d_{T_Δ}(f_Δ(p), f_Δ(q)) ≤ d(p, q)`. -/ theorem tripodMap_oneLipschitz {α : Type*} {d : α → α → ℝ} {x y z : α} (hd : IsPseudoMetricFn d) (Δ : GeodesicTri d x y z) (p q : TriPt Δ) : tripodDist (tripodMap Δ p) (tripodMap Δ q) ≤ d (triPtVal Δ p) (triPtVal Δ q) := by have hab : gromovProd d x y z + gromovProd d y x z = d x y := gromovProd_add_swap hd x y z have hac : gromovProd d x y z + gromovProd d z x y = d x z := by rw [gromovProd_symm hd x y z]; exact gromovProd_add_swap hd x z y have hbc : gromovProd d y x z + gromovProd d z x y = d y z := by rw [gromovProd_symm hd y x z, gromovProd_symm hd z x y]; exact gromovProd_add_swap hd y z x have hdist_diff : ∀ u v w : α, |d u v - d u w| ≤ d v w := fun u v w => by rw [abs_le]; constructor · linarith [hd.triangle u v w] · linarith [hd.triangle u w v, hd.symm w v] -- Non-recursive pairwise helpers: have hxy_xz : ∀ s t (hs0 : 0 ≤ s) (hs1 : s ≤ d x y) (ht0 : 0 ≤ t) (ht1 : t ≤ d x z), tripodDist (tripodMap Δ (.xy s hs0 hs1)) (tripodMap Δ (.xz t ht0 ht1)) ≤ d (Δ.xy.γ s) (Δ.xz.γ t) := by intro s t hs0 hs1 ht0 ht1 have hx := hdist_diff x (Δ.xy.γ s) (Δ.xz.γ t) rw [Δ.xy.dist_start hd hs0 hs1, Δ.xz.dist_start hd ht0 ht1] at hx have hyz : d y z ≤ d (Δ.xy.γ s) y + d (Δ.xy.γ s) (Δ.xz.γ t) + d (Δ.xz.γ t) z := by have h1 := hd.triangle y (Δ.xy.γ s) z have h2 := hd.triangle (Δ.xy.γ s) (Δ.xz.γ t) z rw [hd.symm y (Δ.xy.γ s)] at h1; linarith rw [Δ.xy.dist_stop hd hs0 hs1, Δ.xz.dist_stop hd ht0 ht1] at hyz by_cases hs : s ≤ gromovProd d x y z <;> by_cases ht : t ≤ gromovProd d x y z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · rw [show gromovProd d x y z - s - (gromovProd d x y z - t) = -(s - t) by ring, abs_neg]; exact hx · linarith [(abs_le.mp hx).1] · linarith [(abs_le.mp hx).2] · linarith have hxy_yz : ∀ s t (hs0 : 0 ≤ s) (hs1 : s ≤ d x y) (ht0 : 0 ≤ t) (ht1 : t ≤ d y z), tripodDist (tripodMap Δ (.xy s hs0 hs1)) (tripodMap Δ (.yz t ht0 ht1)) ≤ d (Δ.xy.γ s) (Δ.yz.γ t) := by intro s t hs0 hs1 ht0 ht1 have hy := hdist_diff y (Δ.xy.γ s) (Δ.yz.γ t) rw [hd.symm y (Δ.xy.γ s), Δ.xy.dist_stop hd hs0 hs1, Δ.yz.dist_start hd ht0 ht1] at hy have hxz : d x z ≤ d x (Δ.xy.γ s) + d (Δ.xy.γ s) (Δ.yz.γ t) + d (Δ.yz.γ t) z := by linarith [hd.triangle x (Δ.xy.γ s) z, hd.triangle (Δ.xy.γ s) (Δ.yz.γ t) z] rw [Δ.xy.dist_start hd hs0 hs1, Δ.yz.dist_stop hd ht0 ht1] at hxz by_cases hs : s ≤ gromovProd d x y z <;> by_cases ht : t ≤ gromovProd d y x z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · linarith [(abs_le.mp hy).2] · linarith · rw [show s - gromovProd d x y z - (gromovProd d y x z - t) = -((d x y - s) - t) by linarith, abs_neg] exact hy · linarith [(abs_le.mp hy).1] have hxz_yz : ∀ s t (hs0 : 0 ≤ s) (hs1 : s ≤ d x z) (ht0 : 0 ≤ t) (ht1 : t ≤ d y z), tripodDist (tripodMap Δ (.xz s hs0 hs1)) (tripodMap Δ (.yz t ht0 ht1)) ≤ d (Δ.xz.γ s) (Δ.yz.γ t) := by intro s t hs0 hs1 ht0 ht1 have hz := hdist_diff z (Δ.xz.γ s) (Δ.yz.γ t) rw [hd.symm z (Δ.xz.γ s), hd.symm z (Δ.yz.γ t), Δ.xz.dist_stop hd hs0 hs1, Δ.yz.dist_stop hd ht0 ht1] at hz have hxy : d x y ≤ d x (Δ.xz.γ s) + d (Δ.xz.γ s) (Δ.yz.γ t) + d (Δ.yz.γ t) y := by linarith [hd.triangle x (Δ.xz.γ s) y, hd.triangle (Δ.xz.γ s) (Δ.yz.γ t) y] rw [Δ.xz.dist_start hd hs0 hs1, hd.symm (Δ.yz.γ t) y, Δ.yz.dist_start hd ht0 ht1] at hxy by_cases hs : s ≤ gromovProd d x y z <;> by_cases ht : t ≤ gromovProd d y x z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · linarith · linarith [(abs_le.mp hz).2] · linarith [(abs_le.mp hz).1] · rw [show s - gromovProd d x y z - (t - gromovProd d y x z) = -((d x z - s) - (d y z - t)) by linarith, abs_neg] exact hz cases p with | xy s hs0 hs1 => cases q with | xy t ht0 ht1 => simp only [triPtVal]; rw [Δ.xy.isom s t hs0 hs1 ht0 ht1] by_cases hs : s ≤ gromovProd d x y z <;> by_cases ht : t ≤ gromovProd d x y z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · rw [show gromovProd d x y z - s - (gromovProd d x y z - t) = -(s - t) by ring, abs_neg] · rw [abs_of_nonpos (by linarith : s - t ≤ 0)]; linarith · rw [abs_of_nonneg (by linarith : 0 ≤ s - t)]; linarith · rw [show s - gromovProd d x y z - (t - gromovProd d x y z) = s - t by ring] | xz t ht0 ht1 => exact hxy_xz s t hs0 hs1 ht0 ht1 | yz t ht0 ht1 => exact hxy_yz s t hs0 hs1 ht0 ht1 | xz s hs0 hs1 => cases q with | xy t ht0 ht1 => rw [tripodDist_symm, hd.symm]; exact hxy_xz t s ht0 ht1 hs0 hs1 | xz t ht0 ht1 => simp only [triPtVal]; rw [Δ.xz.isom s t hs0 hs1 ht0 ht1] by_cases hs : s ≤ gromovProd d x y z <;> by_cases ht : t ≤ gromovProd d x y z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · rw [show gromovProd d x y z - s - (gromovProd d x y z - t) = -(s - t) by ring, abs_neg] · rw [abs_of_nonpos (by linarith : s - t ≤ 0)]; linarith · rw [abs_of_nonneg (by linarith : 0 ≤ s - t)]; linarith · rw [show s - gromovProd d x y z - (t - gromovProd d x y z) = s - t by ring] | yz t ht0 ht1 => exact hxz_yz s t hs0 hs1 ht0 ht1 | yz s hs0 hs1 => cases q with | xy t ht0 ht1 => rw [tripodDist_symm, hd.symm]; exact hxy_yz t s ht0 ht1 hs0 hs1 | xz t ht0 ht1 => rw [tripodDist_symm, hd.symm]; exact hxz_yz t s ht0 ht1 hs0 hs1 | yz t ht0 ht1 => simp only [triPtVal]; rw [Δ.yz.isom s t hs0 hs1 ht0 ht1] by_cases hs : s ≤ gromovProd d y x z <;> by_cases ht : t ≤ gromovProd d y x z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · rw [show gromovProd d y x z - s - (gromovProd d y x z - t) = -(s - t) by ring, abs_neg] · rw [abs_of_nonpos (by linarith : s - t ≤ 0)]; linarith · rw [abs_of_nonneg (by linarith : 0 ≤ s - t)]; linarith · rw [show s - gromovProd d y x z - (t - gromovProd d y x z) = s - t by ring] /-- **THEOREM (Exact Thin-Tripod Identity)**: For EVERY geodesic triangle `Δ` and EVERY `δ ≥ 0`: `IsThinTri Δ δ ↔ IsTripodDistortionTri Δ δ`! -/ theorem thin_iff_tripod {α : Type*} {d : α → α → ℝ} {x y z : α} (hd : IsPseudoMetricFn d) (Δ : GeodesicTri d x y z) {δ : ℝ} (hδ : 0 ≤ δ) : IsThinTri Δ δ ↔ IsTripodDistortionTri Δ δ := by have ha0 : 0 ≤ gromovProd d x y z := gromovProd_nonneg hd x y z have hb0 : 0 ≤ gromovProd d y x z := gromovProd_nonneg hd y x z have hc0 : 0 ≤ gromovProd d z x y := gromovProd_nonneg hd z x y have hab : gromovProd d x y z + gromovProd d y x z = d x y := gromovProd_add_swap hd x y z have hac : gromovProd d x y z + gromovProd d z x y = d x z := by rw [gromovProd_symm hd x y z]; exact gromovProd_add_swap hd x z y have hbc : gromovProd d y x z + gromovProd d z x y = d y z := by rw [gromovProd_symm hd y x z, gromovProd_symm hd z x y]; exact gromovProd_add_swap hd y z x constructor · intro ⟨h1, h2, h3⟩ p q refine ⟨tripodMap_oneLipschitz hd Δ p q, ?_⟩ set a := gromovProd d x y z set b := gromovProd d y x z set c := gromovProd d z x y have hins12 : d (Δ.xy.γ a) (Δ.xz.γ a) ≤ δ := h1 a ha0 le_rfl have hins13 : d (Δ.xy.γ a) (Δ.yz.γ b) ≤ δ := by have := h2 b hb0 le_rfl; rwa [show d x y - b = a by linarith] at this have hins23 : d (Δ.xz.γ a) (Δ.yz.γ b) ≤ δ := by have := h3 c hc0 le_rfl rwa [show d x z - c = a by linarith, show d y z - c = b by linarith] at this have hsame_xy : ∀ s t (hs0 : 0 ≤ s) (hs1 : s ≤ d x y) (ht0 : 0 ≤ t) (ht1 : t ≤ d x y), d (Δ.xy.γ s) (Δ.xy.γ t) ≤ tripodDist (tripodMap Δ (.xy s hs0 hs1)) (tripodMap Δ (.xy t ht0 ht1)) + δ := by intro s t hs0 hs1 ht0 ht1 rw [Δ.xy.isom s t hs0 hs1 ht0 ht1] by_cases hs : s ≤ gromovProd d x y z <;> by_cases ht : t ≤ gromovProd d x y z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · rw [show gromovProd d x y z - s - (gromovProd d x y z - t) = -(s - t) by ring, abs_neg]; linarith · rw [abs_of_nonpos (by linarith : s - t ≤ 0)]; linarith · rw [abs_of_nonneg (by linarith : 0 ≤ s - t)]; linarith · rw [show s - gromovProd d x y z - (t - gromovProd d x y z) = s - t by ring]; linarith have hxy_xz : ∀ s t (hs0 : 0 ≤ s) (hs1 : s ≤ d x y) (ht0 : 0 ≤ t) (ht1 : t ≤ d x z), d (Δ.xy.γ s) (Δ.xz.γ t) ≤ tripodDist (tripodMap Δ (.xy s hs0 hs1)) (tripodMap Δ (.xz t ht0 ht1)) + δ := by intro s t hs0 hs1 ht0 ht1 by_cases hs : s ≤ gromovProd d x y z <;> by_cases ht : t ≤ gromovProd d x y z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · rw [show gromovProd d x y z - s - (gromovProd d x y z - t) = t - s by ring] rcases le_total s t with hst | hts · calc d (Δ.xy.γ s) (Δ.xz.γ t) ≤ d (Δ.xy.γ s) (Δ.xy.γ t) + d (Δ.xy.γ t) (Δ.xz.γ t) := hd.triangle _ _ _ _ = |s - t| + d (Δ.xy.γ t) (Δ.xz.γ t) := by rw [Δ.xy.isom s t hs0 hs1 ht0 (by linarith)] _ ≤ |t - s| + δ := by rw [abs_sub_comm]; linarith [h1 t ht0 ht] · calc d (Δ.xy.γ s) (Δ.xz.γ t) ≤ d (Δ.xy.γ s) (Δ.xz.γ s) + d (Δ.xz.γ s) (Δ.xz.γ t) := hd.triangle _ _ _ _ = d (Δ.xy.γ s) (Δ.xz.γ s) + |s - t| := by rw [Δ.xz.isom s t hs0 (by linarith) ht0 ht1] _ ≤ |t - s| + δ := by rw [abs_sub_comm]; linarith [h1 s hs0 hs] · calc d (Δ.xy.γ s) (Δ.xz.γ t) ≤ d (Δ.xy.γ s) (Δ.xy.γ a) + (d (Δ.xy.γ a) (Δ.xz.γ a) + d (Δ.xz.γ a) (Δ.xz.γ t)) := by linarith [hd.triangle (Δ.xy.γ s) (Δ.xy.γ a) (Δ.xz.γ t), hd.triangle (Δ.xy.γ a) (Δ.xz.γ a) (Δ.xz.γ t)] _ = |s - a| + (d (Δ.xy.γ a) (Δ.xz.γ a) + |a - t|) := by rw [Δ.xy.isom s a hs0 hs1 ha0 (by linarith), Δ.xz.isom a t ha0 (by linarith) ht0 ht1] _ ≤ (a - s) + (t - a) + δ := by rw [abs_of_nonpos (by linarith), abs_of_nonpos (by linarith)]; linarith · calc d (Δ.xy.γ s) (Δ.xz.γ t) ≤ d (Δ.xy.γ s) (Δ.xy.γ a) + (d (Δ.xy.γ a) (Δ.xz.γ a) + d (Δ.xz.γ a) (Δ.xz.γ t)) := by linarith [hd.triangle (Δ.xy.γ s) (Δ.xy.γ a) (Δ.xz.γ t), hd.triangle (Δ.xy.γ a) (Δ.xz.γ a) (Δ.xz.γ t)] _ = |s - a| + (d (Δ.xy.γ a) (Δ.xz.γ a) + |a - t|) := by rw [Δ.xy.isom s a hs0 hs1 ha0 (by linarith), Δ.xz.isom a t ha0 (by linarith) ht0 ht1] _ ≤ (s - a) + (a - t) + δ := by rw [abs_of_nonneg (by linarith), abs_of_nonneg (by linarith)]; linarith · calc d (Δ.xy.γ s) (Δ.xz.γ t) ≤ d (Δ.xy.γ s) (Δ.xy.γ a) + (d (Δ.xy.γ a) (Δ.xz.γ a) + d (Δ.xz.γ a) (Δ.xz.γ t)) := by linarith [hd.triangle (Δ.xy.γ s) (Δ.xy.γ a) (Δ.xz.γ t), hd.triangle (Δ.xy.γ a) (Δ.xz.γ a) (Δ.xz.γ t)] _ = |s - a| + (d (Δ.xy.γ a) (Δ.xz.γ a) + |a - t|) := by rw [Δ.xy.isom s a hs0 hs1 ha0 (by linarith), Δ.xz.isom a t ha0 (by linarith) ht0 ht1] _ ≤ (s - a) + (t - a) + δ := by rw [abs_of_nonneg (by linarith), abs_of_nonpos (by linarith)]; linarith have hxy_yz : ∀ s t (hs0 : 0 ≤ s) (hs1 : s ≤ d x y) (ht0 : 0 ≤ t) (ht1 : t ≤ d y z), d (Δ.xy.γ s) (Δ.yz.γ t) ≤ tripodDist (tripodMap Δ (.xy s hs0 hs1)) (tripodMap Δ (.yz t ht0 ht1)) + δ := by intro s t hs0 hs1 ht0 ht1 by_cases hs : s ≤ gromovProd d x y z <;> by_cases ht : t ≤ gromovProd d y x z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · calc d (Δ.xy.γ s) (Δ.yz.γ t) ≤ d (Δ.xy.γ s) (Δ.xy.γ a) + (d (Δ.xy.γ a) (Δ.yz.γ b) + d (Δ.yz.γ b) (Δ.yz.γ t)) := by linarith [hd.triangle (Δ.xy.γ s) (Δ.xy.γ a) (Δ.yz.γ t), hd.triangle (Δ.xy.γ a) (Δ.yz.γ b) (Δ.yz.γ t)] _ = |s - a| + (d (Δ.xy.γ a) (Δ.yz.γ b) + |b - t|) := by rw [Δ.xy.isom s a hs0 hs1 ha0 (by linarith), Δ.yz.isom b t hb0 (by linarith) ht0 ht1] _ ≤ (a - s) + (b - t) + δ := by rw [abs_of_nonpos (by linarith), abs_of_nonneg (by linarith)]; linarith · calc d (Δ.xy.γ s) (Δ.yz.γ t) ≤ d (Δ.xy.γ s) (Δ.xy.γ a) + (d (Δ.xy.γ a) (Δ.yz.γ b) + d (Δ.yz.γ b) (Δ.yz.γ t)) := by linarith [hd.triangle (Δ.xy.γ s) (Δ.xy.γ a) (Δ.yz.γ t), hd.triangle (Δ.xy.γ a) (Δ.yz.γ b) (Δ.yz.γ t)] _ = |s - a| + (d (Δ.xy.γ a) (Δ.yz.γ b) + |b - t|) := by rw [Δ.xy.isom s a hs0 hs1 ha0 (by linarith), Δ.yz.isom b t hb0 (by linarith) ht0 ht1] _ ≤ (a - s) + (t - b) + δ := by rw [abs_of_nonpos (by linarith), abs_of_nonpos (by linarith)]; linarith · set u := d x y - s have hu0 : 0 ≤ u := by linarith have hub : u ≤ b := by linarith have hdiff : s - gromovProd d x y z - (gromovProd d y x z - t) = t - u := by linarith rw [hdiff] rcases le_total u t with hut | htu · calc d (Δ.xy.γ s) (Δ.yz.γ t) ≤ d (Δ.xy.γ s) (Δ.yz.γ u) + d (Δ.yz.γ u) (Δ.yz.γ t) := hd.triangle _ _ _ _ = d (Δ.xy.γ (d x y - u)) (Δ.yz.γ u) + |u - t| := by rw [show d x y - u = s by ring, Δ.yz.isom u t hu0 (by linarith) ht0 ht1] _ ≤ |t - u| + δ := by rw [abs_sub_comm]; linarith [h2 u hu0 hub] · calc d (Δ.xy.γ s) (Δ.yz.γ t) ≤ d (Δ.xy.γ s) (Δ.xy.γ (d x y - t)) + d (Δ.xy.γ (d x y - t)) (Δ.yz.γ t) := hd.triangle _ _ _ _ = |s - (d x y - t)| + d (Δ.xy.γ (d x y - t)) (Δ.yz.γ t) := by rw [Δ.xy.isom s (d x y - t) hs0 hs1 (by linarith) (by linarith)] _ ≤ |t - u| + δ := by rw [show s - (d x y - t) = t - u by linarith]; linarith [h2 t ht0 ht] · calc d (Δ.xy.γ s) (Δ.yz.γ t) ≤ d (Δ.xy.γ s) (Δ.xy.γ a) + (d (Δ.xy.γ a) (Δ.yz.γ b) + d (Δ.yz.γ b) (Δ.yz.γ t)) := by linarith [hd.triangle (Δ.xy.γ s) (Δ.xy.γ a) (Δ.yz.γ t), hd.triangle (Δ.xy.γ a) (Δ.yz.γ b) (Δ.yz.γ t)] _ = |s - a| + (d (Δ.xy.γ a) (Δ.yz.γ b) + |b - t|) := by rw [Δ.xy.isom s a hs0 hs1 ha0 (by linarith), Δ.yz.isom b t hb0 (by linarith) ht0 ht1] _ ≤ (s - a) + (t - b) + δ := by rw [abs_of_nonneg (by linarith), abs_of_nonpos (by linarith)]; linarith have hxz_yz : ∀ s t (hs0 : 0 ≤ s) (hs1 : s ≤ d x z) (ht0 : 0 ≤ t) (ht1 : t ≤ d y z), d (Δ.xz.γ s) (Δ.yz.γ t) ≤ tripodDist (tripodMap Δ (.xz s hs0 hs1)) (tripodMap Δ (.yz t ht0 ht1)) + δ := by intro s t hs0 hs1 ht0 ht1 by_cases hs : s ≤ gromovProd d x y z <;> by_cases ht : t ≤ gromovProd d y x z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · calc d (Δ.xz.γ s) (Δ.yz.γ t) ≤ d (Δ.xz.γ s) (Δ.xz.γ a) + (d (Δ.xz.γ a) (Δ.yz.γ b) + d (Δ.yz.γ b) (Δ.yz.γ t)) := by linarith [hd.triangle (Δ.xz.γ s) (Δ.xz.γ a) (Δ.yz.γ t), hd.triangle (Δ.xz.γ a) (Δ.yz.γ b) (Δ.yz.γ t)] _ = |s - a| + (d (Δ.xz.γ a) (Δ.yz.γ b) + |b - t|) := by rw [Δ.xz.isom s a hs0 hs1 ha0 (by linarith), Δ.yz.isom b t hb0 (by linarith) ht0 ht1] _ ≤ (a - s) + (b - t) + δ := by rw [abs_of_nonpos (by linarith), abs_of_nonneg (by linarith)]; linarith · calc d (Δ.xz.γ s) (Δ.yz.γ t) ≤ d (Δ.xz.γ s) (Δ.xz.γ a) + (d (Δ.xz.γ a) (Δ.yz.γ b) + d (Δ.yz.γ b) (Δ.yz.γ t)) := by linarith [hd.triangle (Δ.xz.γ s) (Δ.xz.γ a) (Δ.yz.γ t), hd.triangle (Δ.xz.γ a) (Δ.yz.γ b) (Δ.yz.γ t)] _ = |s - a| + (d (Δ.xz.γ a) (Δ.yz.γ b) + |b - t|) := by rw [Δ.xz.isom s a hs0 hs1 ha0 (by linarith), Δ.yz.isom b t hb0 (by linarith) ht0 ht1] _ ≤ (a - s) + (t - b) + δ := by rw [abs_of_nonpos (by linarith), abs_of_nonpos (by linarith)]; linarith · calc d (Δ.xz.γ s) (Δ.yz.γ t) ≤ d (Δ.xz.γ s) (Δ.xz.γ a) + (d (Δ.xz.γ a) (Δ.yz.γ b) + d (Δ.yz.γ b) (Δ.yz.γ t)) := by linarith [hd.triangle (Δ.xz.γ s) (Δ.xz.γ a) (Δ.yz.γ t), hd.triangle (Δ.xz.γ a) (Δ.yz.γ b) (Δ.yz.γ t)] _ = |s - a| + (d (Δ.xz.γ a) (Δ.yz.γ b) + |b - t|) := by rw [Δ.xz.isom s a hs0 hs1 ha0 (by linarith), Δ.yz.isom b t hb0 (by linarith) ht0 ht1] _ ≤ (s - a) + (b - t) + δ := by rw [abs_of_nonneg (by linarith), abs_of_nonneg (by linarith)]; linarith · set u := d x z - s set v := d y z - t have hu0 : 0 ≤ u := by linarith have huc : u ≤ c := by linarith have hv0 : 0 ≤ v := by linarith have hvc : v ≤ c := by linarith have hdiff : s - gromovProd d x y z - (t - gromovProd d y x z) = v - u := by linarith rw [hdiff] rcases le_total u v with huv | hvu · calc d (Δ.xz.γ s) (Δ.yz.γ t) ≤ d (Δ.xz.γ s) (Δ.yz.γ (d y z - u)) + d (Δ.yz.γ (d y z - u)) (Δ.yz.γ t) := hd.triangle _ _ _ _ = d (Δ.xz.γ (d x z - u)) (Δ.yz.γ (d y z - u)) + |(d y z - u) - t| := by rw [show d x z - u = s by ring, Δ.yz.isom (d y z - u) t (by linarith) (by linarith) ht0 ht1] _ ≤ |v - u| + δ := by rw [show (d y z - u) - t = v - u by linarith]; linarith [h3 u hu0 huc] · calc d (Δ.xz.γ s) (Δ.yz.γ t) ≤ d (Δ.xz.γ s) (Δ.xz.γ (d x z - v)) + d (Δ.xz.γ (d x z - v)) (Δ.yz.γ (d y z - v)) := by rw [show d y z - v = t by ring]; exact hd.triangle _ _ _ _ = |s - (d x z - v)| + d (Δ.xz.γ (d x z - v)) (Δ.yz.γ (d y z - v)) := by rw [Δ.xz.isom s (d x z - v) hs0 hs1 (by linarith) (by linarith)] _ ≤ |v - u| + δ := by rw [show s - (d x z - v) = v - u by linarith]; linarith [h3 v hv0 hvc] cases p with | xy s hs0 hs1 => cases q with | xy t ht0 ht1 => exact hsame_xy s t hs0 hs1 ht0 ht1 | xz t ht0 ht1 => exact hxy_xz s t hs0 hs1 ht0 ht1 | yz t ht0 ht1 => exact hxy_yz s t hs0 hs1 ht0 ht1 | xz s hs0 hs1 => cases q with | xy t ht0 ht1 => rw [hd.symm, tripodDist_symm]; exact hxy_xz t s ht0 ht1 hs0 hs1 | xz t ht0 ht1 => simp only [triPtVal]; rw [Δ.xz.isom s t hs0 hs1 ht0 ht1] by_cases hs : s ≤ gromovProd d x y z <;> by_cases ht : t ≤ gromovProd d x y z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · rw [show gromovProd d x y z - s - (gromovProd d x y z - t) = -(s - t) by ring, abs_neg]; linarith · rw [abs_of_nonpos (by linarith : s - t ≤ 0)]; linarith · rw [abs_of_nonneg (by linarith : 0 ≤ s - t)]; linarith · rw [show s - gromovProd d x y z - (t - gromovProd d x y z) = s - t by ring]; linarith | yz t ht0 ht1 => exact hxz_yz s t hs0 hs1 ht0 ht1 | yz s hs0 hs1 => cases q with | xy t ht0 ht1 => rw [hd.symm, tripodDist_symm]; exact hxy_yz t s ht0 ht1 hs0 hs1 | xz t ht0 ht1 => rw [hd.symm, tripodDist_symm]; exact hxz_yz t s ht0 ht1 hs0 hs1 | yz t ht0 ht1 => simp only [triPtVal]; rw [Δ.yz.isom s t hs0 hs1 ht0 ht1] by_cases hs : s ≤ gromovProd d y x z <;> by_cases ht : t ≤ gromovProd d y x z <;> simp only [tripodMap, tripodDist, hs, ht, ↓reduceIte, Fin.isValue, Fin.reduceEq] · rw [show gromovProd d y x z - s - (gromovProd d y x z - t) = -(s - t) by ring, abs_neg]; linarith · rw [abs_of_nonpos (by linarith : s - t ≤ 0)]; linarith · rw [abs_of_nonneg (by linarith : 0 ≤ s - t)]; linarith · rw [show s - gromovProd d y x z - (t - gromovProd d y x z) = s - t by ring]; linarith · intro htr refine ⟨?_, ?_, ?_⟩ · intro t ht0 hta have h := (htr (.xy t ht0 (by linarith)) (.xz t ht0 (by linarith))).2 simp only [triPtVal, tripodMap, tripodDist, hta, ↓reduceIte, sub_self, abs_zero, zero_add] at h exact h · intro t ht0 htb have h := (htr (.xy (d x y - t) (by linarith) (by linarith)) (.yz t ht0 (by linarith))).2 simp only [triPtVal, tripodMap, tripodDist, htb, ↓reduceIte] at h by_cases h1 : d x y - t ≤ gromovProd d x y z · have heq : t = gromovProd d y x z := by linarith subst heq have hsub : d x y - gromovProd d y x z = gromovProd d x y z := by linarith simp only [hsub, le_rfl, ↓reduceIte, Fin.isValue, Fin.reduceEq, sub_self, add_zero, zero_add] at h simpa [hsub] using h · simp only [h1, ↓reduceIte, show d x y - t - gromovProd d x y z - (gromovProd d y x z - t) = 0 by linarith, abs_zero, zero_add] at h exact h · intro t ht0 htc have h := (htr (.xz (d x z - t) (by linarith) (by linarith)) (.yz (d y z - t) (by linarith) (by linarith))).2 simp only [triPtVal, tripodMap, tripodDist] at h by_cases h1 : d x z - t ≤ gromovProd d x y z · have heq : t = gromovProd d z x y := by linarith subst heq have hsub1 : d x z - gromovProd d z x y = gromovProd d x y z := by linarith have hsub2 : d y z - gromovProd d z x y = gromovProd d y x z := by linarith simp only [hsub1, hsub2, le_rfl, ↓reduceIte, Fin.isValue, Fin.reduceEq, sub_self, add_zero, zero_add] at h simpa [hsub1, hsub2] using h · have h2 : ¬ (d y z - t ≤ gromovProd d y x z) := by linarith simp only [h1, h2, ↓reduceIte, show d x z - t - gromovProd d x y z - (d y z - t - gromovProd d y x z) = 0 by linarith, abs_zero, zero_add] at h exact h /-! ## Section 4: Complete Quantitative Conversion Matrix Among All 5 Definitions -/ /-- `δ_ins(Δ) ≤ δ_thin(Δ)`. -/ theorem insize_of_thin {α : Type*} {d : α → α → ℝ} {x y z : α} (hd : IsPseudoMetricFn d) {Δ : GeodesicTri d x y z} {δ : ℝ} (hth : IsThinTri Δ δ) : IsInsizeTri Δ δ := by have ha0 : 0 ≤ gromovProd d x y z := gromovProd_nonneg hd x y z have hb0 : 0 ≤ gromovProd d y x z := gromovProd_nonneg hd y x z have hc0 : 0 ≤ gromovProd d z x y := gromovProd_nonneg hd z x y have hab : gromovProd d x y z + gromovProd d y x z = d x y := gromovProd_add_swap hd x y z have hac : gromovProd d x y z + gromovProd d z x y = d x z := by rw [gromovProd_symm hd x y z]; exact gromovProd_add_swap hd x z y have hbc : gromovProd d y x z + gromovProd d z x y = d y z := by rw [gromovProd_symm hd y x z, gromovProd_symm hd z x y]; exact gromovProd_add_swap hd y z x refine ⟨hth.1 _ ha0 le_rfl, ?_, ?_⟩ · have := hth.2.1 _ hb0 le_rfl rwa [show d x y - gromovProd d y x z = gromovProd d x y z by linarith] at this · have := hth.2.2 _ hc0 le_rfl rwa [show d x z - gromovProd d z x y = gromovProd d x y z by linarith, show d y z - gromovProd d z x y = gromovProd d y x z by linarith] at this /-- `δ_slim(Δ) ≤ δ_thin(Δ)`. -/ theorem slim_of_thin {α : Type*} {d : α → α → ℝ} {x y z : α} (hd : IsPseudoMetricFn d) {Δ : GeodesicTri d x y z} {δ : ℝ} (hth : IsThinTri Δ δ) : IsSlimTri Δ δ := by have hab := gromovProd_add_swap hd x y z have hac : gromovProd d x y z + gromovProd d z x y = d x z := by rw [gromovProd_symm hd x y z]; exact gromovProd_add_swap hd x z y have hbc : gromovProd d y x z + gromovProd d z x y = d y z := by rw [gromovProd_symm hd y x z, gromovProd_symm hd z x y]; exact gromovProd_add_swap hd y z x have hc0 := gromovProd_nonneg hd z x y have hb0 := gromovProd_nonneg hd y x z have ha0 := gromovProd_nonneg hd x y z refine ⟨?_, ?_, ?_⟩ · intro t ht0 ht1 rcases le_total t (gromovProd d x y z) with h | h · left; exact ⟨t, ht0, by linarith, hth.1 t ht0 h⟩ · right refine ⟨d x y - t, by linarith, by linarith, ?_⟩ have := hth.2.1 (d x y - t) (by linarith) (by linarith) rwa [show d x y - (d x y - t) = t by ring] at this · intro t ht0 ht1 rcases le_total t (gromovProd d x y z) with h | h · left; exact ⟨t, ht0, by linarith, by rw [hd.symm]; exact hth.1 t ht0 h⟩ · right refine ⟨d y z - (d x z - t), by linarith, by linarith, ?_⟩ have := hth.2.2 (d x z - t) (by linarith) (by linarith) rwa [show d x z - (d x z - t) = t by ring] at this · intro t ht0 ht1 rcases le_total t (gromovProd d y x z) with h | h · left; exact ⟨d x y - t, by linarith, by linarith, by rw [hd.symm]; exact hth.2.1 t ht0 h⟩ · right refine ⟨d x z - (d y z - t), by linarith, by linarith, ?_⟩ have := hth.2.2 (d y z - t) (by linarith) (by linarith) rw [show d y z - (d y z - t) = t by ring, hd.symm] at this exact this /-- Single-vertex thinness helper from slimness: if every point on `xy` and `xz` is within `δ` of the union of the other two sides, then for `0 ≤ t ≤ (y | z)_x`, `d(xy(t), xz(t)) ≤ 4δ`. -/ lemma thin_vertex_of_slim {α : Type*} {d : α → α → ℝ} {x y z : α} (hd : IsPseudoMetricFn d) (Δ : GeodesicTri d x y z) {δ : ℝ} (hδ : 0 ≤ δ) (hsl_xy : ∀ t, 0 ≤ t → t ≤ d x y → (∃ s, 0 ≤ s ∧ s ≤ d x z ∧ d (Δ.xy.γ t) (Δ.xz.γ s) ≤ δ) ∨ (∃ s, 0 ≤ s ∧ s ≤ d y z ∧ d (Δ.xy.γ t) (Δ.yz.γ s) ≤ δ)) (hsl_xz : ∀ t, 0 ≤ t → t ≤ d x z → (∃ s, 0 ≤ s ∧ s ≤ d x y ∧ d (Δ.xz.γ t) (Δ.xy.γ s) ≤ δ) ∨ (∃ s, 0 ≤ s ∧ s ≤ d y z ∧ d (Δ.xz.γ t) (Δ.yz.γ s) ≤ δ)) {t : ℝ} (ht0 : 0 ≤ t) (hta : t ≤ gromovProd d x y z) : d (Δ.xy.γ t) (Δ.xz.γ t) ≤ 4 * δ := by have hab := gromovProd_add_swap hd x y z have hac : gromovProd d x y z + gromovProd d z x y = d x z := by rw [gromovProd_symm hd x y z]; exact gromovProd_add_swap hd x z y have hbc : gromovProd d y x z + gromovProd d z x y = d y z := by rw [gromovProd_symm hd y x z, gromovProd_symm hd z x y]; exact gromovProd_add_swap hd y z x have htxy : t ≤ d x y := by linarith [gromovProd_nonneg hd y x z] have htxz : t ≤ d x z := by linarith [gromovProd_nonneg hd z x y] rcases hsl_xy t ht0 htxy with ⟨s, hs0, hs1, hds⟩ | ⟨u, hu0, hu1, hdu⟩ · -- `p = xy(t)` is within `δ` of `r = xz(s)` => `|s - t| ≤ δ`, so `d(p, xz(t)) ≤ 2δ ≤ 4δ`! have hst : |s - t| ≤ δ := by have h1 := hd.triangle x (Δ.xy.γ t) (Δ.xz.γ s) have h2 := hd.triangle x (Δ.xz.γ s) (Δ.xy.γ t) rw [Δ.xy.dist_start hd ht0 htxy, Δ.xz.dist_start hd hs0 hs1] at h1 h2 rw [hd.symm (Δ.xz.γ s)] at h2 rw [abs_le]; constructor <;> linarith have h3 := hd.triangle (Δ.xy.γ t) (Δ.xz.γ s) (Δ.xz.γ t) rw [Δ.xz.isom s t hs0 hs1 ht0 htxz] at h3 linarith · -- `p = xy(t)` is within `δ` of `yz(u)` rcases hsl_xz t ht0 htxz with ⟨s, hs0, hs1, hds⟩ | ⟨u', hu'0, hu'1, hdu'⟩ · have hst : |s - t| ≤ δ := by have h1 := hd.triangle x (Δ.xz.γ t) (Δ.xy.γ s) have h2 := hd.triangle x (Δ.xy.γ s) (Δ.xz.γ t) rw [Δ.xz.dist_start hd ht0 htxz, Δ.xy.dist_start hd hs0 hs1] at h1 h2 rw [hd.symm (Δ.xy.γ s)] at h2 rw [abs_le]; constructor <;> linarith have h3 := hd.triangle (Δ.xy.γ t) (Δ.xy.γ s) (Δ.xz.γ t) rw [Δ.xy.isom t s ht0 htxy hs0 hs1, abs_sub_comm, hd.symm (Δ.xy.γ s)] at h3 linarith · -- Both `u` and `u'` lie in the interval `[d(x,y) - t - δ, d(y,z) - d(x,z) + t + δ]` of width `≤ 2δ`! have hu_lo : d x y - t - δ ≤ u := by have h1 := hd.triangle (Δ.xy.γ t) (Δ.yz.γ u) y rw [Δ.xy.dist_stop hd ht0 htxy, hd.symm (Δ.yz.γ u) y, Δ.yz.dist_start hd hu0 hu1] at h1 linarith have hu_hi : u ≤ d y z - d x z + t + δ := by have h1 := hd.triangle x (Δ.xy.γ t) z have h2 := hd.triangle (Δ.xy.γ t) (Δ.yz.γ u) z rw [Δ.xy.dist_start hd ht0 htxy] at h1 rw [Δ.yz.dist_stop hd hu0 hu1] at h2 linarith have hu'_lo : d x y - t - δ ≤ u' := by have h1 := hd.triangle x (Δ.xz.γ t) y have h2 := hd.triangle (Δ.xz.γ t) (Δ.yz.γ u') y rw [Δ.xz.dist_start hd ht0 htxz] at h1 rw [hd.symm (Δ.yz.γ u') y, Δ.yz.dist_start hd hu'0 hu'1] at h2 linarith have hu'_hi : u' ≤ d y z - d x z + t + δ := by have h1 := hd.triangle (Δ.xz.γ t) (Δ.yz.γ u') z rw [Δ.xz.dist_stop hd ht0 htxz, Δ.yz.dist_stop hd hu'0 hu'1] at h1 linarith have huu' : |u - u'| ≤ 2 * δ := by rw [abs_le]; constructor <;> linarith have htri1 := hd.triangle (Δ.xy.γ t) (Δ.yz.γ u) (Δ.xz.γ t) have htri2 := hd.triangle (Δ.yz.γ u) (Δ.yz.γ u') (Δ.xz.γ t) rw [Δ.yz.isom u u' hu0 hu1 hu'0 hu'1, hd.symm (Δ.yz.γ u')] at htri2 linarith /-- **THEOREM (Sharp `δ_thin ≤ 4 δ_slim` and `δ_ins ≤ 4 δ_slim` for EVERY Geodesic Triangle)**: Shown to be EXACTLY SHARP (factor 4 attained!) by `lSpaceWitnessTri` in Section 5! -/ theorem thin_of_four_slim {α : Type*} {d : α → α → ℝ} {x y z : α} (hd : IsPseudoMetricFn d) {Δ : GeodesicTri d x y z} {δ : ℝ} (hδ : 0 ≤ δ) (hsl : IsSlimTri Δ δ) : IsThinTri Δ (4 * δ) := by refine ⟨?_, ?_, ?_⟩ · intro t ht0 hta exact thin_vertex_of_slim hd Δ hδ hsl.1 hsl.2.1 ht0 hta · intro t ht0 htb -- Rotate triangle to vertex `y` with sides `yx = Δ.xy.rev`, `yz = Δ.yz`, `xz = Δ.xz` let Δy : GeodesicTri d y x z := ⟨Δ.xy.rev hd, Δ.yz, Δ.xz⟩ have hsl_yx : ∀ s, 0 ≤ s → s ≤ d y x → (∃ r, 0 ≤ r ∧ r ≤ d y z ∧ d (Δy.xy.γ s) (Δy.xz.γ r) ≤ δ) ∨ (∃ r, 0 ≤ r ∧ r ≤ d x z ∧ d (Δy.xy.γ s) (Δy.yz.γ r) ≤ δ) := by intro s hs0 hs1 rw [hd.symm y x] at hs1 rcases hsl.1 (d x y - s) (by linarith) (by linarith) with ⟨r, hr0, hr1, hdr⟩ | ⟨r, hr0, hr1, hdr⟩ · right; exact ⟨r, hr0, hr1, hdr⟩ · left; exact ⟨r, hr0, hr1, hdr⟩ have hsl_yz : ∀ s, 0 ≤ s → s ≤ d y z → (∃ r, 0 ≤ r ∧ r ≤ d y x ∧ d (Δy.xz.γ s) (Δy.xy.γ r) ≤ δ) ∨ (∃ r, 0 ≤ r ∧ r ≤ d x z ∧ d (Δy.xz.γ s) (Δy.yz.γ r) ≤ δ) := by intro s hs0 hs1 rcases hsl.2.2 s hs0 hs1 with ⟨r, hr0, hr1, hdr⟩ | ⟨r, hr0, hr1, hdr⟩ · left refine ⟨d x y - r, by linarith, by rw [hd.symm y x]; linarith, ?_⟩ simpa [Δy, GeodesicSeg.rev, show d x y - (d x y - r) = r by ring] using hdr · right; exact ⟨r, hr0, hr1, hdr⟩ exact thin_vertex_of_slim hd Δy hδ hsl_yx hsl_yz ht0 htb · intro t ht0 htc let Δz : GeodesicTri d z x y := ⟨Δ.xz.rev hd, Δ.yz.rev hd, Δ.xy⟩ have hsl_zx : ∀ s, 0 ≤ s → s ≤ d z x → (∃ r, 0 ≤ r ∧ r ≤ d z y ∧ d (Δz.xy.γ s) (Δz.xz.γ r) ≤ δ) ∨ (∃ r, 0 ≤ r ∧ r ≤ d x y ∧ d (Δz.xy.γ s) (Δz.yz.γ r) ≤ δ) := by intro s hs0 hs1 rw [hd.symm z x] at hs1 rcases hsl.2.1 (d x z - s) (by linarith) (by linarith) with ⟨r, hr0, hr1, hdr⟩ | ⟨r, hr0, hr1, hdr⟩ · right; exact ⟨r, hr0, hr1, hdr⟩ · left refine ⟨d y z - r, by linarith, by rw [hd.symm z y]; linarith, ?_⟩ simpa [Δz, GeodesicSeg.rev, show d y z - (d y z - r) = r by ring] using hdr have hsl_zy : ∀ s, 0 ≤ s → s ≤ d z y → (∃ r, 0 ≤ r ∧ r ≤ d z x ∧ d (Δz.xz.γ s) (Δz.xy.γ r) ≤ δ) ∨ (∃ r, 0 ≤ r ∧ r ≤ d x y ∧ d (Δz.xz.γ s) (Δz.yz.γ r) ≤ δ) := by intro s hs0 hs1 rw [hd.symm z y] at hs1 rcases hsl.2.2 (d y z - s) (by linarith) (by linarith) with ⟨r, hr0, hr1, hdr⟩ | ⟨r, hr0, hr1, hdr⟩ · right; exact ⟨r, hr0, hr1, hdr⟩ · left refine ⟨d x z - r, by linarith, by rw [hd.symm z x]; linarith, ?_⟩ simpa [Δz, GeodesicSeg.rev, show d x z - (d x z - r) = r by ring] using hdr exact thin_vertex_of_slim hd Δz hδ hsl_zx hsl_zy ht0 htc theorem insize_of_four_slim {α : Type*} {d : α → α → ℝ} {x y z : α} (hd : IsPseudoMetricFn d) {Δ : GeodesicTri d x y z} {δ : ℝ} (hδ : 0 ≤ δ) (hsl : IsSlimTri Δ δ) : IsInsizeTri Δ (4 * δ) := insize_of_thin hd (thin_of_four_slim hd hδ hsl) /-- **THEOREM (Sharper Mixed-Parameter Bound `δ_4 ≤ (δ_ins + δ_thin) / 2 ≤ δ_thin`)**: -/ theorem fourPoint_of_insize_and_thin {α : Type*} {d : α → α → ℝ} (hd : IsPseudoMetricFn d) (hgeo : IsGeodesicSpace d) {δ₁ δ₂ : ℝ} (hins : IsInsizeSpace d δ₁) (hthin : IsThinSpace d δ₂) : IsFourPointHyp d ((δ₁ + δ₂) / 2) := by intro x y z w -- Prove `(x | y)_w ≥ min((x | z)_w, (y | z)_w) - (δ₁ + δ₂) / 2` obtain ⟨gwx⟩ := hgeo w x obtain ⟨gwy⟩ := hgeo w y obtain ⟨gwz⟩ := hgeo w z obtain ⟨gxz⟩ := hgeo x z obtain ⟨gyz⟩ := hgeo y z let Δ₁ : GeodesicTri d w x z := ⟨gwx, gwz, gxz⟩ let Δ₂ : GeodesicTri d w y z := ⟨gwy, gwz, gyz⟩ rcases le_total (gromovProd d w x z) (gromovProd d w y z) with hle | hle · set t := gromovProd d w x z have ht0 : 0 ≤ t := gromovProd_nonneg hd w x z have htx : t ≤ d w x := by rw [hd.symm]; exact gromovProd_le_left hd w x z have hty : t ≤ d w y := by rw [hd.symm]; exact le_trans hle (gromovProd_le_left hd w y z) have h1 : d (gwx.γ t) (gwz.γ t) ≤ δ₁ := (hins w x z Δ₁).1 have h2 : d (gwy.γ t) (gwz.γ t) ≤ δ₂ := (hthin w y z Δ₂).1 t ht0 hle have hxy : d x y ≤ d (gwx.γ t) x + d (gwx.γ t) (gwz.γ t) + d (gwz.γ t) (gwy.γ t) + d (gwy.γ t) y := by have t1 := hd.triangle x (gwx.γ t) y have t2 := hd.triangle (gwx.γ t) (gwz.γ t) y have t3 := hd.triangle (gwz.γ t) (gwy.γ t) y rw [hd.symm x (gwx.γ t)] at t1; linarith rw [gwx.dist_stop hd ht0 htx, gwy.dist_stop hd ht0 hty, hd.symm (gwz.γ t) (gwy.γ t)] at hxy have hmx := le_max_left (d x z + d y w) (d x w + d y z) have htdef : t = (d x w + d z w - d x z) / 2 := rfl linarith [hd.symm x w, hd.symm y w, hd.symm z w] · set t := gromovProd d w y z have ht0 : 0 ≤ t := gromovProd_nonneg hd w y z have htx : t ≤ d w x := by rw [hd.symm]; exact le_trans hle (gromovProd_le_left hd w x z) have hty : t ≤ d w y := by rw [hd.symm]; exact gromovProd_le_left hd w y z have h1 : d (gwy.γ t) (gwz.γ t) ≤ δ₁ := (hins w y z Δ₂).1 have h2 : d (gwx.γ t) (gwz.γ t) ≤ δ₂ := (hthin w x z Δ₁).1 t ht0 hle have hxy : d x y ≤ d (gwx.γ t) x + d (gwx.γ t) (gwz.γ t) + d (gwz.γ t) (gwy.γ t) + d (gwy.γ t) y := by have t1 := hd.triangle x (gwx.γ t) y have t2 := hd.triangle (gwx.γ t) (gwz.γ t) y have t3 := hd.triangle (gwz.γ t) (gwy.γ t) y rw [hd.symm x (gwx.γ t)] at t1; linarith rw [gwx.dist_stop hd ht0 htx, gwy.dist_stop hd ht0 hty, hd.symm (gwz.γ t) (gwy.γ t)] at hxy have hmx := le_max_right (d x z + d y w) (d x w + d y z) have htdef : t = (d y w + d z w - d y z) / 2 := rfl linarith [hd.symm x w, hd.symm y w, hd.symm z w, hd.symm y z] theorem fourPoint_of_thin {α : Type*} {d : α → α → ℝ} (hd : IsPseudoMetricFn d) (hgeo : IsGeodesicSpace d) {δ : ℝ} (hthin : IsThinSpace d δ) : IsFourPointHyp d δ := by have h := fourPoint_of_insize_and_thin hd hgeo (fun x y z Δ => insize_of_thin hd (hthin x y z Δ)) hthin simpa using h /-- **THEOREM (IVT-Free Proof of `δ_4 ≤ 2 δ_slim`)**: Pure 6-line algebraic proof with ZERO continuity/IVT assumptions! -/ theorem fourPoint_of_two_slim {α : Type*} {d : α → α → ℝ} (hd : IsPseudoMetricFn d) (hgeo : IsGeodesicSpace d) {δ : ℝ} (hsl : IsSlimSpace d δ) : IsFourPointHyp d (2 * δ) := by intro x y z w obtain ⟨gwx⟩ := hgeo w x obtain ⟨gwy⟩ := hgeo w y obtain ⟨gwz⟩ := hgeo w z obtain ⟨gxz⟩ := hgeo x z obtain ⟨gyz⟩ := hgeo y z let Δ₁ : GeodesicTri d w x z := ⟨gwx, gwz, gxz⟩ let Δ₂ : GeodesicTri d w y z := ⟨gwy, gwz, gyz⟩ set t := min (gromovProd d w x z) (gromovProd d w y z) have ht0 : 0 ≤ t := le_min (gromovProd_nonneg hd w x z) (gromovProd_nonneg hd w y z) have htz : t ≤ d w z := by rw [hd.symm w z]; exact le_trans (min_le_left _ _) (gromovProd_le_right hd w x z) -- Helper: on any `δ`-slim triangle `(w, u, z)`, `m = gwz(t)` (`t ≤ (u|z)_w`) satisfies `d(u, m) ≤ d(w, u) - t + 2δ`! have hbound : ∀ (u : α) (Δ : GeodesicTri d w u z), Δ.xz = gwz → t ≤ gromovProd d w u z → d u (gwz.γ t) ≤ d w u - t + 2 * δ := by intro u Δ hΔ ht_le rcases (hsl w u z Δ).2.1 t ht0 htz with ⟨s, hs0, hs1, hds⟩ | ⟨s, hs0, hs1, hds⟩ · rw [hΔ] at hds have hws : t - δ ≤ s := by have h1 := hd.triangle w (Δ.xy.γ s) (gwz.γ t) rw [Δ.xy.dist_start hd hs0 hs1, gwz.dist_start hd ht0 htz, hd.symm (Δ.xy.γ s)] at h1 linarith have htri := hd.triangle u (Δ.xy.γ s) (gwz.γ t) rw [hd.symm u (Δ.xy.γ s), Δ.xy.dist_stop hd hs0 hs1, hd.symm (Δ.xy.γ s)] at htri linarith · rw [hΔ] at hds have hzs : d w z - t - δ ≤ d (Δ.yz.γ s) z := by have h1 := hd.triangle (gwz.γ t) (Δ.yz.γ s) z rw [gwz.dist_stop hd ht0 htz] at h1; linarith rw [Δ.yz.dist_stop hd hs0 hs1] at hzs have htri := hd.triangle u (Δ.yz.γ s) (gwz.γ t) rw [Δ.yz.dist_start hd hs0 hs1, hd.symm (Δ.yz.γ s)] at htri unfold gromovProd at ht_le rw [hd.symm u w, hd.symm z w] at ht_le linarith have hx := hbound x Δ₁ rfl (min_le_left _ _) have hy := hbound y Δ₂ rfl (min_le_right _ _) have hxy : d x y ≤ d w x + d w y - 2 * t + 4 * δ := by linarith [hd.triangle x (gwz.γ t) y, hd.symm (gwz.γ t) y] rcases le_total (gromovProd d w x z) (gromovProd d w y z) with hle | hle · have : t = gromovProd d w x z := min_eq_left hle unfold gromovProd at this linarith [le_max_left (d x z + d y w) (d x w + d y z), hd.symm w x, hd.symm w y, hd.symm w z] · have : t = gromovProd d w y z := min_eq_right hle unfold gromovProd at this linarith [le_max_right (d x z + d y w) (d x w + d y z), hd.symm w x, hd.symm w y, hd.symm w z, hd.symm y z] /-- **THEOREM (Sharper `δ_slim ≤ 3 δ_4`, beating textbook `4 δ_4`!)**: Every geodesic triangle in a 4-point `δ`-hyperbolic space is `3δ`-slim! -/ theorem slim_of_three_fourPoint {α : Type*} {d : α → α → ℝ} {δ : ℝ} (hd : IsPseudoMetricFn d) (hh : IsFourPointHyp d δ) : IsSlimSpace d (3 * δ) := by -- Helper for a single side `xy` against `xz ∪ yz` have hside : ∀ {x y z : α} (gxy : GeodesicSeg d x y) (gxz : GeodesicSeg d x z) (gyz : GeodesicSeg d y z), ∀ t, 0 ≤ t → t ≤ d x y → (∃ s, 0 ≤ s ∧ s ≤ d x z ∧ d (gxy.γ t) (gxz.γ s) ≤ 3 * δ) ∨ (∃ s, 0 ≤ s ∧ s ≤ d y z ∧ d (gxy.γ t) (gyz.γ s) ≤ 3 * δ) := by intro x y z gxy gxz gyz t ht0 ht1 set p := gxy.γ t have hpx : d p x = t := by rw [hd.symm]; exact gxy.dist_start hd ht0 ht1 have hpy : d p y = d x y - t := gxy.dist_stop hd ht0 ht1 -- Apply 4-point condition to `(x, y, z, p)`: either `(x | z)_p ≤ δ` or `(y | z)_p ≤ δ`! have h4 := hh x y z p rcases le_max_iff.mp (by linarith : d x y + d z p - 2 * δ ≤ max (d x z + d y p) (d x p + d y z)) with h1 | h2 · -- `(x | z)_p ≤ δ`! Pick `s = (p | z)_x ∈ [0, d x z]` on `gxz`! left set s := gromovProd d x p z have hs0 : 0 ≤ s := gromovProd_nonneg hd x p z have hs1 : s ≤ d x z := by rw [hd.symm x z]; exact gromovProd_le_right hd x p z refine ⟨s, hs0, hs1, ?_⟩ have h4' := hh p (gxz.γ s) x z have hqx : d (gxz.γ s) x = s := by rw [hd.symm]; exact gxz.dist_start hd hs0 hs1 have hqz : d (gxz.γ s) z = d x z - s := gxz.dist_stop hd hs0 hs1 have hsdef : s = (d p x + d z x - d p z) / 2 := rfl rcases le_max_iff.mp (by linarith : d p (gxz.γ s) + d x z - 2 * δ ≤ max (d p x + d (gxz.γ s) z) (d p z + d (gxz.γ s) x)) with ha | hb <;> linarith [hd.symm z p, hd.symm y p, hd.symm x p, hd.symm z x] · -- `(y | z)_p ≤ δ`! Pick `s = (p | z)_y ∈ [0, d y z]` on `gyz`! right set s := gromovProd d y p z have hs0 : 0 ≤ s := gromovProd_nonneg hd y p z have hs1 : s ≤ d y z := by rw [hd.symm y z]; exact gromovProd_le_right hd y p z refine ⟨s, hs0, hs1, ?_⟩ have h4' := hh p (gyz.γ s) y z have hqy : d (gyz.γ s) y = s := by rw [hd.symm]; exact gyz.dist_start hd hs0 hs1 have hqz : d (gyz.γ s) z = d y z - s := gyz.dist_stop hd hs0 hs1 have hsdef : s = (d p y + d z y - d p z) / 2 := rfl rcases le_max_iff.mp (by linarith : d p (gyz.γ s) + d y z - 2 * δ ≤ max (d p y + d (gyz.γ s) z) (d p z + d (gyz.γ s) y)) with ha | hb <;> linarith [hd.symm z p, hd.symm x p, hd.symm z y] intro x y z Δ refine ⟨hside Δ.xy Δ.xz Δ.yz, ?_, ?_⟩ · intro t ht0 ht1 rcases hside Δ.xz Δ.xy (Δ.yz.rev hd) t ht0 ht1 with h | ⟨s, hs0, hs1, hds⟩ · left; exact h · right rw [hd.symm z y] at hs1 exact ⟨d y z - s, by linarith, by linarith, hds⟩ · intro t ht0 ht1 rcases hside Δ.yz (Δ.xy.rev hd) (Δ.xz.rev hd) t ht0 ht1 with ⟨s, hs0, hs1, hds⟩ | ⟨s, hs0, hs1, hds⟩ · left rw [hd.symm y x] at hs1 exact ⟨d x y - s, by linarith, by linarith, hds⟩ · right rw [hd.symm z x] at hs1 exact ⟨d x z - s, by linarith, by linarith, hds⟩ /-- **THEOREM (Sharp `δ_thin ≤ 4 δ_4` and `δ_ins ≤ 4 δ_4`)**: Shown to be EXACTLY SHARP (factor 4 attained!) by our unbounded `L_∞` space in Section 5! -/ theorem thin_of_four_fourPoint {α : Type*} {d : α → α → ℝ} {δ : ℝ} (hd : IsPseudoMetricFn d) (hh : IsFourPointHyp d δ) : IsThinSpace d (4 * δ) := by have hvertex : ∀ {x y z : α} (gxy : GeodesicSeg d x y) (gxz : GeodesicSeg d x z), ∀ t, 0 ≤ t → t ≤ gromovProd d x y z → d (gxy.γ t) (gxz.γ t) ≤ 4 * δ := by intro x y z gxy gxz t ht0 hta have htxy : t ≤ d x y := le_trans hta (by rw [hd.symm]; exact gromovProd_le_left hd x y z) have htxz : t ≤ d x z := le_trans hta (by rw [hd.symm]; exact gromovProd_le_right hd x y z) set p := gxy.γ t set q := gxz.γ t have hpx : d p x = t := by rw [hd.symm]; exact gxy.dist_start hd ht0 htxy have hpy : d p y = d x y - t := gxy.dist_stop hd ht0 htxy have hqx : d q x = t := by rw [hd.symm]; exact gxz.dist_start hd ht0 htxz have hqz : d q z = d x z - t := gxz.dist_stop hd ht0 htxz -- Step 1: 4-point on `(q, y, x, z)` gives `d q y ≤ d x y - t + 2δ` have h1 := hh q y x z have hqy : d q y ≤ d x y - t + 2 * δ := by unfold gromovProd at hta rw [hd.symm y x, hd.symm z x] at hta rcases le_max_iff.mp (by linarith : d q y + d x z - 2 * δ ≤ max (d q x + d y z) (d q z + d y x)) with ha | hb <;> linarith [hd.symm y x] -- Step 2: 4-point on `(p, q, x, y)` gives `d p q ≤ 4δ`! have h2 := hh p q x y rcases le_max_iff.mp (by linarith : d p q + d x y - 2 * δ ≤ max (d p x + d q y) (d p y + d q x)) with ha | hb · linarith · have hδ0 : 0 ≤ δ := by have h0 := hh x x x x; simp [hd.self] at h0; linarith linarith intro x y z Δ refine ⟨hvertex Δ.xy Δ.xz, ?_, ?_⟩ · intro t ht0 htb exact hvertex (Δ.xy.rev hd) Δ.yz t ht0 htb · intro t ht0 htc exact hvertex (Δ.xz.rev hd) (Δ.yz.rev hd) t ht0 htc theorem insize_of_four_fourPoint {α : Type*} {d : α → α → ℝ} {δ : ℝ} (hd : IsPseudoMetricFn d) (hh : IsFourPointHyp d δ) : IsInsizeSpace d (4 * δ) := fun x y z Δ => insize_of_thin hd (thin_of_four_fourPoint hd hh x y z Δ) /-- **THEOREM (Global Insize-to-Slim `(3/2)` and Insize-to-Thin `(2)` Conversions)**: In every geodesic space with `δ`-insize triangles, all triangles are `(3/2) δ`-slim AND `2δ`-thin! -/ theorem slim_and_thin_of_insize {α : Type*} {d : α → α → ℝ} (hd : IsPseudoMetricFn d) (hgeo : IsGeodesicSpace d) {δ : ℝ} (hins : IsInsizeSpace d δ) : IsSlimSpace d (3 / 2 * δ) ∧ IsThinSpace d (2 * δ) := by have hvertex : ∀ {x y z : α} (gxy : GeodesicSeg d x y) (gxz : GeodesicSeg d x z) (gyz : GeodesicSeg d y z), ∀ t, 0 ≤ t → t ≤ gromovProd d x y z → d (gxy.γ t) (gxz.γ t) ≤ 2 * δ ∧ ∃ s, 0 ≤ s ∧ s ≤ d x z ∧ d (gxy.γ t) (gxz.γ s) ≤ 3 / 2 * δ := by intro x y z gxy gxz gyz t ht0 hta set a := gromovProd d x y z have htxy : t ≤ d x y := le_trans hta (by rw [hd.symm]; exact gromovProd_le_left hd x y z) have htxz : t ≤ d x z := le_trans hta (by rw [hd.symm]; exact gromovProd_le_right hd x y z) have ha_xy : a ≤ d x y := by rw [hd.symm]; exact gromovProd_le_left hd x y z have ha_xz : a ≤ d x z := by rw [hd.symm]; exact gromovProd_le_right hd x y z have ha0 : 0 ≤ a := gromovProd_nonneg hd x y z -- Bound `d(p, z)` via internal points `gxy(a)` and `gxz(a)`! set p := gxy.γ t have hins1 : d (gxy.γ a) (gxz.γ a) ≤ δ := (hins x y z ⟨gxy, gxz, gyz⟩).1 have hpz : d p z ≤ d x z - t + δ := by have t1 := hd.triangle p (gxy.γ a) z have t2 := hd.triangle (gxy.γ a) (gxz.γ a) z rw [gxy.isom t a ht0 htxy ha0 ha_xy, abs_of_nonpos (by linarith)] at t1 rw [gxz.dist_stop hd ha0 ha_xz] at t2 linarith -- Form subtriangle `Δ' = (x, p, z)` with `g_xp = gxy.prefix`, `g_xz = gxz`, and geodesic `g_pz`! obtain ⟨gpz⟩ := hgeo p z let Δ' : GeodesicTri d x p z := ⟨gxy.prefix hd ht0 htxy, gxz, gpz⟩ set s := gromovProd d x p z have hs0 : 0 ≤ s := gromovProd_nonneg hd x p z have hs_le_t : s ≤ t := by have := gromovProd_le_left hd x p z rw [hd.symm p x, gxy.dist_start hd ht0 htxy] at this; exact this have hs_ge : t - δ / 2 ≤ s := by unfold s gromovProd rw [hd.symm p x, gxy.dist_start hd ht0 htxy, hd.symm z x] linarith have hins' : d (gxy.γ s) (gxz.γ s) ≤ δ := (hins x p z Δ').1 have hps : d p (gxz.γ s) ≤ 3 / 2 * δ := by have h1 := hd.triangle p (gxy.γ s) (gxz.γ s) rw [gxy.isom t s ht0 htxy hs0 (hs_le_t.trans htxy), abs_of_nonneg (by linarith)] at h1 linarith have hpq : d p (gxz.γ t) ≤ 2 * δ := by have h1 := hd.triangle p (gxz.γ s) (gxz.γ t) rw [gxz.isom s t hs0 (hs_le_t.trans htxz) ht0 htxz, abs_of_nonpos (by linarith)] at h1 linarith exact ⟨hpq, s, hs0, hs_le_t.trans htxz, hps⟩ -- Build both `IsSlimSpace` and `IsThinSpace` from `hvertex`! have hthin : IsThinSpace d (2 * δ) := by intro x y z Δ refine ⟨fun t ht0 hta => (hvertex Δ.xy Δ.xz Δ.yz t ht0 hta).1, ?_, ?_⟩ · intro t ht0 htb exact (hvertex (Δ.xy.rev hd) Δ.yz Δ.xz t ht0 htb).1 · intro t ht0 htc exact (hvertex (Δ.xz.rev hd) (Δ.yz.rev hd) Δ.xy t ht0 htc).1 have hslim : IsSlimSpace d (3 / 2 * δ) := by intro x y z Δ have hab := gromovProd_add_swap hd x y z have hac : gromovProd d x y z + gromovProd d z x y = d x z := by rw [gromovProd_symm hd x y z]; exact gromovProd_add_swap hd x z y have hbc : gromovProd d y x z + gromovProd d z x y = d y z := by rw [gromovProd_symm hd y x z, gromovProd_symm hd z x y]; exact gromovProd_add_swap hd y z x refine ⟨?_, ?_, ?_⟩ · intro t ht0 ht1 rcases le_total t (gromovProd d x y z) with h | h · left; exact (hvertex Δ.xy Δ.xz Δ.yz t ht0 h).2 · right have ⟨s, hs0, hs1, hds⟩ := (hvertex (Δ.xy.rev hd) Δ.yz Δ.xz (d x y - t) (by linarith) (by linarith)).2 refine ⟨s, hs0, hs1, ?_⟩ simpa [GeodesicSeg.rev, show d x y - (d x y - t) = t by ring] using hds · intro t ht0 ht1 rcases le_total t (gromovProd d x y z) with h | h · left exact (hvertex Δ.xz Δ.xy (Δ.yz.rev hd) t ht0 (by rw [gromovProd_symm hd]; exact h)).2 · right have ⟨s, hs0, hs1, hds⟩ := (hvertex (Δ.xz.rev hd) (Δ.yz.rev hd) Δ.xy (d x z - t) (by linarith) (by linarith)).2 rw [hd.symm z y] at hs1 refine ⟨d y z - s, by linarith, by linarith, ?_⟩ simpa [GeodesicSeg.rev, show d x z - (d x z - t) = t by ring] using hds · intro t ht0 ht1 rcases le_total t (gromovProd d y x z) with h | h · left have ⟨s, hs0, hs1, hds⟩ := (hvertex Δ.yz (Δ.xy.rev hd) (Δ.xz.rev hd) t ht0 (by rw [gromovProd_symm hd]; exact h)).2 rw [hd.symm y x] at hs1 exact ⟨d x y - s, by linarith, by linarith, hds⟩ · right have ⟨s, hs0, hs1, hds⟩ := (hvertex (Δ.yz.rev hd) (Δ.xz.rev hd) (Δ.xy.rev hd) (d y z - t) (by linarith) (by rw [gromovProd_symm hd]; linarith)).2 rw [hd.symm z x] at hs1 refine ⟨d x z - s, by linarith, by linarith, ?_⟩ simpa [GeodesicSeg.rev, show d y z - (d y z - t) = t by ring] using hds exact ⟨hslim, hthin⟩ /-- **THEOREM (Busemann Thin-Insize Collapse)**: In any geodesic space where same-basepoint geodesics satisfy Busemann convexity `d(γ₁(λL₁), γ₂(λL₂)) ≤ λ d(γ₁(L₁), γ₂(L₂))` for `λ ∈ [0, 1]`, we have the EXACT COLLAPSE `IsInsizeTri Δ δ ↔ IsThinTri Δ δ` (and hence `δ_ins = δ_thin = δ_trip`!) -/ theorem busemann_thin_iff_insize {α : Type*} {d : α → α → ℝ} {x y z : α} (hd : IsPseudoMetricFn d) (hbuse : ∀ {o p q : α} (g₁ : GeodesicSeg d o p) (g₂ : GeodesicSeg d o q), ∀ (L : ℝ), 0 ≤ L → L ≤ d o p → L ≤ d o q → ∀ (lam : ℝ), 0 ≤ lam → lam ≤ 1 → d (g₁.γ (lam * L)) (g₂.γ (lam * L)) ≤ lam * d (g₁.γ L) (g₂.γ L)) {Δ : GeodesicTri d x y z} {δ : ℝ} (hδ : 0 ≤ δ) : IsThinTri Δ δ ↔ IsInsizeTri Δ δ := by constructor · exact insize_of_thin hd · intro ⟨h1, h2, h3⟩ have ha0 := gromovProd_nonneg hd x y z have hb0 := gromovProd_nonneg hd y x z have hc0 := gromovProd_nonneg hd z x y have hab := gromovProd_add_swap hd x y z have hac : gromovProd d x y z + gromovProd d z x y = d x z := by rw [gromovProd_symm hd x y z]; exact gromovProd_add_swap hd x z y have hbc : gromovProd d y x z + gromovProd d z x y = d y z := by rw [gromovProd_symm hd y x z, gromovProd_symm hd z x y]; exact gromovProd_add_swap hd y z x refine ⟨?_, ?_, ?_⟩ · intro t ht0 hta rcases eq_or_lt_of_le ha0 with ha_eq | ha_pos · have ht_eq : t = 0 := by linarith subst ht_eq; rw [Δ.xy.start, Δ.xz.start, hd.self]; exact hδ · set lam := t / gromovProd d x y z have hlam0 : 0 ≤ lam := div_nonneg ht0 (le_of_lt ha_pos) have hlam1 : lam ≤ 1 := (div_le_one ha_pos).mpr hta have hmul : lam * gromovProd d x y z = t := div_mul_cancel₀ t (ne_of_gt ha_pos) have hb := hbuse Δ.xy Δ.xz (gromovProd d x y z) ha0 (by linarith) (by linarith) lam hlam0 hlam1 rw [hmul] at hb calc d (Δ.xy.γ t) (Δ.xz.γ t) ≤ lam * d (Δ.xy.γ (gromovProd d x y z)) (Δ.xz.γ (gromovProd d x y z)) := hb _ ≤ 1 * δ := mul_le_mul hlam1 h1 (hd.nonneg _ _) zero_le_one _ = δ := one_mul δ · intro t ht0 htb rcases eq_or_lt_of_le hb0 with hb_eq | hb_pos · have ht_eq : t = 0 := by linarith subst ht_eq; rw [sub_zero, Δ.xy.stop, Δ.yz.start, hd.self]; exact hδ · set lam := t / gromovProd d y x z have hlam0 : 0 ≤ lam := div_nonneg ht0 (le_of_lt hb_pos) have hlam1 : lam ≤ 1 := (div_le_one hb_pos).mpr htb have hmul : lam * gromovProd d y x z = t := div_mul_cancel₀ t (ne_of_gt hb_pos) have hb := hbuse (Δ.xy.rev hd) Δ.yz (gromovProd d y x z) hb0 (by rw [hd.symm]; linarith) (by linarith) lam hlam0 hlam1 simp only [GeodesicSeg.rev, hmul] at hb rw [show d x y - gromovProd d y x z = gromovProd d x y z by linarith] at hb calc d (Δ.xy.γ (d x y - t)) (Δ.yz.γ t) ≤ lam * d (Δ.xy.γ (gromovProd d x y z)) (Δ.yz.γ (gromovProd d y x z)) := hb _ ≤ 1 * δ := mul_le_mul hlam1 h2 (hd.nonneg _ _) zero_le_one _ = δ := one_mul δ · intro t ht0 htc rcases eq_or_lt_of_le hc0 with hc_eq | hc_pos · have ht_eq : t = 0 := by linarith subst ht_eq; rw [sub_zero, sub_zero, Δ.xz.stop, Δ.yz.stop, hd.self]; exact hδ · set lam := t / gromovProd d z x y have hlam0 : 0 ≤ lam := div_nonneg ht0 (le_of_lt hc_pos) have hlam1 : lam ≤ 1 := (div_le_one hc_pos).mpr htc have hmul : lam * gromovProd d z x y = t := div_mul_cancel₀ t (ne_of_gt hc_pos) have hb := hbuse (Δ.xz.rev hd) (Δ.yz.rev hd) (gromovProd d z x y) hc0 (by rw [hd.symm]; linarith) (by rw [hd.symm]; linarith) lam hlam0 hlam1 simp only [GeodesicSeg.rev, hmul] at hb rw [show d x z - gromovProd d z x y = gromovProd d x y z by linarith, show d y z - gromovProd d z x y = gromovProd d y x z by linarith] at hb calc d (Δ.xz.γ (d x z - t)) (Δ.yz.γ (d y z - t)) ≤ lam * d (Δ.xz.γ (gromovProd d x y z)) (Δ.yz.γ (gromovProd d y x z)) := hb _ ≤ 1 * δ := mul_le_mul hlam1 h3 (hd.nonneg _ _) zero_le_one _ = δ := one_mul δ /-! ## Section 5: Sharp Separation Witness 1 — The Unbounded ℓ₁ L-Space `L_∞` -/ /-- The unbounded L-shaped subset `L_∞ = ([0, ∞) × [0, 1]) ∪ ([0, 1] × [0, ∞))` of `(ℝ², ℓ₁)`. -/ def LSpace : Type := { p : ℝ × ℝ // 0 ≤ p.1 ∧ 0 ≤ p.2 ∧ (p.1 ≤ 1 ∨ p.2 ≤ 1) } /-- The `ℓ₁` distance on `LSpace`. -/ def lSpaceDist (p q : LSpace) : ℝ := |p.1.1 - q.1.1| + |p.1.2 - q.1.2| lemma lSpaceDist_isPseudoMetricFn : IsPseudoMetricFn lSpaceDist where nonneg p q := add_nonneg (abs_nonneg _) (abs_nonneg _) self p := by simp [lSpaceDist] symm p q := by simp [lSpaceDist, abs_sub_comm] triangle p q r := by unfold lSpaceDist have h1 : |p.1.1 - r.1.1| ≤ |p.1.1 - q.1.1| + |q.1.1 - r.1.1| := by have : p.1.1 - r.1.1 = (p.1.1 - q.1.1) + (q.1.1 - r.1.1) := by ring rw [this]; exact abs_add_le _ _ have h2 : |p.1.2 - r.1.2| ≤ |p.1.2 - q.1.2| + |q.1.2 - r.1.2| := by have : p.1.2 - r.1.2 = (p.1.2 - q.1.2) + (q.1.2 - r.1.2) := by ring rw [this]; exact abs_add_le _ _ linarith /-- Helper: axis-aligned L-shaped unit-speed `ℓ₁` geodesic from `(u₁, v₁)` to `(u₂, v₂)` via `(u₂, v₁)`. -/ noncomputable def lSpaceAxisGeoUV (p q : LSpace) (hcorner : p.1.2 ≤ 1 ∨ q.1.1 ≤ 1) : GeodesicSeg lSpaceDist p q := by let dx := |q.1.1 - p.1.1| let dy := |q.1.2 - p.1.2| let sx : ℝ := if p.1.1 ≤ q.1.1 then 1 else -1 let sy : ℝ := if p.1.2 ≤ q.1.2 then 1 else -1 let f : ℝ → ℝ × ℝ := fun t => if t ≤ dx then (p.1.1 + sx * max 0 t, p.1.2) else (q.1.1, p.1.2 + sy * min dy (t - dx)) have hf_mem : ∀ t, 0 ≤ (f t).1 ∧ 0 ≤ (f t).2 ∧ ((f t).1 ≤ 1 ∨ (f t).2 ≤ 1) := by intro t dsimp only [f, dx, dy, sx, sy] split_ifs with h1 h2 h3 · -- t ≤ dx, p.1.1 ≤ q.1.1 have hmax0 : 0 ≤ max 0 t := le_max_left 0 t have hmax_le : max 0 t ≤ q.1.1 - p.1.1 := by rw [abs_of_nonneg (by linarith)] at h1; exact max_le (by linarith) h1 refine ⟨by linarith [p.2.1], p.2.2.1, ?_⟩ rcases hcorner with hp2 | hq1 · right; exact hp2 · left; linarith · -- t ≤ dx, q.1.1 < p.1.1 have hmax0 : 0 ≤ max 0 t := le_max_left 0 t have hmax_le : max 0 t ≤ p.1.1 - q.1.1 := by rw [abs_of_neg (by linarith)] at h1; exact max_le (by linarith) (by linarith) refine ⟨by linarith [q.2.1], p.2.2.1, ?_⟩ rcases p.2.2.2 with hp1 | hp2 · left; linarith · right; exact hp2 · -- t > dx, p.1.2 ≤ q.1.2 have hmin0 : 0 ≤ min |q.1.2 - p.1.2| (t - |q.1.1 - p.1.1|) := le_min (abs_nonneg _) (by linarith) have hmin_le : min |q.1.2 - p.1.2| (t - |q.1.1 - p.1.1|) ≤ q.1.2 - p.1.2 := le_trans (min_le_left _ _) (le_of_eq (abs_of_nonneg (by linarith))) refine ⟨q.2.1, by linarith [p.2.2.1], ?_⟩ rcases q.2.2.2 with hq1 | hq2 · left; exact hq1 · right; linarith · -- t > dx, q.1.2 < p.1.2 have hmin0 : 0 ≤ min |q.1.2 - p.1.2| (t - |q.1.1 - p.1.1|) := le_min (abs_nonneg _) (by linarith) have hmin_le : min |q.1.2 - p.1.2| (t - |q.1.1 - p.1.1|) ≤ p.1.2 - q.1.2 := le_trans (min_le_left _ _) (le_of_eq (by rw [abs_of_neg (by linarith)]; ring)) refine ⟨q.2.1, by linarith [q.2.2.1], ?_⟩ rcases hcorner with hp2 | hq1 · right; linarith · left; exact hq1 refine ⟨fun t => ⟨f t, hf_mem t⟩, ?_, ?_, ?_⟩ · apply Subtype.ext; dsimp only [f, dx] rw [if_pos (abs_nonneg _)]; simp · apply Subtype.ext; dsimp only [f, dx, dy, sx, sy, lSpaceDist] rw [abs_sub_comm p.1.1 q.1.1, abs_sub_comm p.1.2 q.1.2] by_cases hdy0 : |q.1.2 - p.1.2| = 0 · have hq2 : p.1.2 = q.1.2 := by linarith [abs_eq_zero.mp hdy0] rw [hdy0, add_zero, if_pos le_rfl, max_eq_right (abs_nonneg _)] split_ifs with h1 · rw [abs_of_nonneg (by linarith)]; ext <;> dsimp <;> linarith · rw [abs_of_neg (by linarith)]; ext <;> dsimp <;> linarith · have hdy_pos : 0 < |q.1.2 - p.1.2| := lt_of_le_of_ne (abs_nonneg _) (Ne.symm hdy0) rw [if_neg (by linarith), show |q.1.1 - p.1.1| + |q.1.2 - p.1.2| - |q.1.1 - p.1.1| = |q.1.2 - p.1.2| by ring, min_self] split_ifs with h2 · rw [abs_of_nonneg (by linarith)]; ext; dsimp; linarith · rw [abs_of_neg (by linarith)]; ext; dsimp; linarith · intro s t hs0 hs1 ht0 ht1 dsimp only [lSpaceDist, f, dx, dy, sx, sy] at hs1 ht1 ⊢ rw [abs_sub_comm p.1.1 q.1.1, abs_sub_comm p.1.2 q.1.2] at hs1 ht1 have hms : max 0 s = s := max_eq_right hs0 have hmt : max 0 t = t := max_eq_right ht0 have hns : min |q.1.2 - p.1.2| (s - |q.1.1 - p.1.1|) = s - |q.1.1 - p.1.1| := min_eq_right (by linarith) have hnt : min |q.1.2 - p.1.2| (t - |q.1.1 - p.1.1|) = t - |q.1.1 - p.1.1| := min_eq_right (by linarith) by_cases hs : s ≤ |q.1.1 - p.1.1| <;> by_cases ht : t ≤ |q.1.1 - p.1.1| <;> simp only [hs, ht, ↓reduceIte, hms, hmt, hns, hnt, sub_self, abs_zero, add_zero, zero_add] · by_cases h1 : p.1.1 ≤ q.1.1 <;> simp only [h1, ↓reduceIte] · rw [show p.1.1 + 1 * s - (p.1.1 + 1 * t) = s - t by ring] · rw [show p.1.1 + -1 * s - (p.1.1 + -1 * t) = -(s - t) by ring, abs_neg] · have h1 : |p.1.1 + (if p.1.1 ≤ q.1.1 then 1 else -1) * s - q.1.1| = |q.1.1 - p.1.1| - s := by by_cases h : p.1.1 ≤ q.1.1 <;> simp only [h, ↓reduceIte] · rw [abs_of_nonneg (by linarith : 0 ≤ q.1.1 - p.1.1)] at hs ⊢ rw [abs_of_nonpos (by linarith : p.1.1 + 1 * s - q.1.1 ≤ 0)]; ring · rw [abs_of_neg (by linarith : q.1.1 - p.1.1 < 0)] at hs ⊢ rw [abs_of_nonneg (by linarith : 0 ≤ p.1.1 + -1 * s - q.1.1)]; ring have h2 : |p.1.2 - (p.1.2 + (if p.1.2 ≤ q.1.2 then 1 else -1) * (t - |q.1.1 - p.1.1|))| = t - |q.1.1 - p.1.1| := by by_cases h : p.1.2 ≤ q.1.2 <;> simp only [h, ↓reduceIte] · rw [show p.1.2 - (p.1.2 + 1 * (t - |q.1.1 - p.1.1|)) = -(t - |q.1.1 - p.1.1|) by ring, abs_neg, abs_of_pos (by linarith)] · rw [show p.1.2 - (p.1.2 + -1 * (t - |q.1.1 - p.1.1|)) = t - |q.1.1 - p.1.1| by ring, abs_of_pos (by linarith)] rw [h1, h2, abs_of_neg (by linarith : s - t < 0)]; ring · have h1 : |q.1.1 - (p.1.1 + (if p.1.1 ≤ q.1.1 then 1 else -1) * t)| = |q.1.1 - p.1.1| - t := by by_cases h : p.1.1 ≤ q.1.1 <;> simp only [h, ↓reduceIte] · rw [abs_of_nonneg (by linarith : 0 ≤ q.1.1 - p.1.1)] at ht ⊢ rw [abs_of_nonneg (by linarith : 0 ≤ q.1.1 - (p.1.1 + 1 * t))]; ring · rw [abs_of_neg (by linarith : q.1.1 - p.1.1 < 0)] at ht ⊢ rw [abs_of_nonpos (by linarith : q.1.1 - (p.1.1 + -1 * t) ≤ 0)]; ring have h2 : |p.1.2 + (if p.1.2 ≤ q.1.2 then 1 else -1) * (s - |q.1.1 - p.1.1|) - p.1.2| = s - |q.1.1 - p.1.1| := by by_cases h : p.1.2 ≤ q.1.2 <;> simp only [h, ↓reduceIte] · rw [show p.1.2 + 1 * (s - |q.1.1 - p.1.1|) - p.1.2 = s - |q.1.1 - p.1.1| by ring, abs_of_pos (by linarith)] · rw [show p.1.2 + -1 * (s - |q.1.1 - p.1.1|) - p.1.2 = -(s - |q.1.1 - p.1.1|) by ring, abs_neg, abs_of_pos (by linarith)] rw [h1, h2, abs_of_pos (by linarith : 0 < s - t)]; ring · by_cases h2 : p.1.2 ≤ q.1.2 <;> simp only [h2, ↓reduceIte] · rw [show p.1.2 + 1 * (s - |q.1.1 - p.1.1|) - (p.1.2 + 1 * (t - |q.1.1 - p.1.1|)) = s - t by ring] · rw [show p.1.2 + -1 * (s - |q.1.1 - p.1.1|) - (p.1.2 + -1 * (t - |q.1.1 - p.1.1|)) = -(s - t) by ring, abs_neg] /-- `LSpace` is a genuine geodesic metric space! -/ theorem lSpace_isGeodesic : IsGeodesicSpace lSpaceDist := by intro p q rcases p.2.2.2 with hp1 | hp2 · -- `p.1.1 ≤ 1`: reverse the geodesic from `q` to `p` (where `q.1.2 ≤ 1 ∨ p.1.1 ≤ 1` holds!) exact ⟨(lSpaceAxisGeoUV q p (Or.inr hp1)).rev lSpaceDist_isPseudoMetricFn⟩ · -- `p.1.2 ≤ 1`: direct geodesic `p -> q`! exact ⟨lSpaceAxisGeoUV p q (Or.inl hp2)⟩ /-- Helper: exact 4-real opposite-sums formula with middle gap! -/ lemma real_four_sums_gap (a b c d : ℝ) : let u1 := |a - b| + |c - d| let u2 := |a - c| + |b - d| let u3 := |a - d| + |b - c| (u1 = u2 ∧ u3 ≤ u1) ∨ (u1 = u3 ∧ u2 ≤ u1) ∨ (u2 = u3 ∧ u1 ≤ u2) := by intro u1 u2 u3 have h1d : ∀ x y z w : ℝ, |x - y| + |z - w| ≤ max (|x - z| + |y - w|) (|x - w| + |y - z|) := by have hord : ∀ x y z w : ℝ, x ≤ y → z ≤ w → |x - y| + |z - w| ≤ max (|x - z| + |y - w|) (|x - w| + |y - z|) := by intro x y z w hxy hzw rw [abs_of_nonpos (by linarith : x - y ≤ 0), abs_of_nonpos (by linarith : z - w ≤ 0)] rcases le_total y z with hyz | hzy · exact le_max_of_le_right (by linarith [neg_le_abs (x - w), neg_le_abs (y - z)]) · rcases le_total w x with hwx | hxw · exact le_max_of_le_right (by linarith [le_abs_self (x - w), le_abs_self (y - z)]) · exact le_max_of_le_right (by linarith [neg_le_abs (x - w), le_abs_self (y - z)]) intro x y z w rcases le_total x y with hxy | hyx <;> rcases le_total z w with hzw | hwz · exact hord x y z w hxy hzw · have h := hord x y w z hxy hwz rwa [abs_sub_comm w z, max_comm] at h · have h := hord y x z w hyx hzw rwa [abs_sub_comm y x, max_comm, add_comm |y - z| |x - w|, add_comm |y - w| |x - z|] at h · have h := hord y x w z hyx hwz rwa [abs_sub_comm y x, abs_sub_comm w z, add_comm |y - w| |x - z|, add_comm |y - z| |x - w|] at h have h1 : u1 ≤ max u2 u3 := h1d a b c d have h2 : u2 ≤ max u1 u3 := by dsimp only [u1, u2, u3] have h := h1d a c b d; rwa [abs_sub_comm c b] at h have h3 : u3 ≤ max u1 u2 := by dsimp only [u1, u2, u3] have h := h1d a d b c; rwa [abs_sub_comm d c, abs_sub_comm d b] at h rcases le_total u1 u2 with h12 | h21 · rcases le_total u2 u3 with h23 | h32 · rw [max_eq_right h12] at h3; right; right; exact ⟨le_antisymm h23 h3, h12⟩ · rcases le_total u1 u3 with h13 | h31 · rw [max_eq_right h13] at h2; right; right; exact ⟨le_antisymm h2 h32, h12⟩ · rw [max_eq_left h31] at h2; left; exact ⟨le_antisymm h12 h2, h31⟩ · rcases le_total u1 u3 with h13 | h31 · rw [max_eq_left h21] at h3; right; left; exact ⟨le_antisymm h13 h3, h21⟩ · rcases le_total u2 u3 with h23 | h32 · rw [max_eq_right h23] at h1; right; left; exact ⟨le_antisymm h1 h31, h21⟩ · rw [max_eq_left h32] at h1; left; exact ⟨le_antisymm h1 h21, h31⟩ /-- Helper: if at least 3 of 4 nonneg numbers are `≤ 1`, then the 3 opposite sums differ by `≤ 2`! -/ lemma four_reals_three_le_one {a b c d : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hc : 0 ≤ c) (hd : 0 ≤ d) (h3 : (a ≤ 1 ∧ b ≤ 1 ∧ c ≤ 1) ∨ (a ≤ 1 ∧ b ≤ 1 ∧ d ≤ 1) ∨ (a ≤ 1 ∧ c ≤ 1 ∧ d ≤ 1) ∨ (b ≤ 1 ∧ c ≤ 1 ∧ d ≤ 1)) : let u1 := |a - b| + |c - d| let u2 := |a - c| + |b - d| let u3 := |a - d| + |b - c| u1 ≤ u2 + 2 ∧ u1 ≤ u3 + 2 ∧ u2 ≤ u1 + 2 ∧ u2 ≤ u3 + 2 ∧ u3 ≤ u1 + 2 ∧ u3 ≤ u2 + 2 := by intro u1 u2 u3 -- Notice: if `x` is the ONE possibly `> 1` point, and `y, z, w ∈ [0, 1]`, then for ANY `p, q ∈ {y, z, w}`: -- `|x - p| + |q - r| ≤ |x - q| + |p - r| + 2` (since `|p - q| ≤ 1`!). have hcore : ∀ x y z w : ℝ, 0 ≤ y → y ≤ 1 → 0 ≤ z → z ≤ 1 → 0 ≤ w → w ≤ 1 → let s1 := |x - y| + |z - w| let s2 := |x - z| + |y - w| let s3 := |x - w| + |y - z| s1 ≤ s2 + 2 ∧ s1 ≤ s3 + 2 ∧ s2 ≤ s1 + 2 ∧ s2 ≤ s3 + 2 ∧ s3 ≤ s1 + 2 ∧ s3 ≤ s2 + 2 := by intro x y z w hy0 hy1 hz0 hz1 hw0 hw1 s1 s2 s3 have hsw : ∀ u v r : ℝ, 0 ≤ u → u ≤ 1 → 0 ≤ v → v ≤ 1 → 0 ≤ r → r ≤ 1 → |x - u| + |v - r| ≤ |x - v| + |u - r| + 2 := by intro u v r hu0 hu1 hv0 hv1 hr0 hr1 have h1 : |x - u| ≤ |x - v| + |u - v| := by have hsub : x - u = (x - v) - (u - v) := by ring rw [hsub]; exact abs_sub _ _ have h2 : |v - r| ≤ 1 := by rw [abs_le]; constructor <;> linarith have h3 : |u - v| ≤ 1 := by rw [abs_le]; constructor <;> linarith linarith [abs_nonneg (u - r)] dsimp only [s1, s2, s3] refine ⟨hsw y z w hy0 hy1 hz0 hz1 hw0 hw1, ?_, hsw z y w hz0 hz1 hy0 hy1 hw0 hw1, ?_, ?_, ?_⟩ · linarith [hsw y w z hy0 hy1 hw0 hw1 hz0 hz1, abs_sub_comm w z, abs_sub_comm y z] · linarith [hsw z w y hz0 hz1 hw0 hw1 hy0 hy1, abs_sub_comm w y, abs_sub_comm y z] · linarith [hsw w y z hw0 hw1 hy0 hy1 hz0 hz1, abs_sub_comm w z] · linarith [hsw w z y hw0 hw1 hz0 hz1 hy0 hy1, abs_sub_comm z y, abs_sub_comm w y] rcases h3 with ⟨h1, h2, h3⟩ | ⟨h1, h2, h3⟩ | ⟨h1, h2, h3⟩ | ⟨h1, h2, h3⟩ · have hc := hcore d c b a hc h3 hb h2 ha h1 dsimp only [u1, u2, u3] dsimp only at hc exact ⟨by linarith [hc.1, abs_sub_comm d c, abs_sub_comm b a, abs_sub_comm d b, abs_sub_comm c a], by linarith [hc.2.1, abs_sub_comm d c, abs_sub_comm b a, abs_sub_comm d a, abs_sub_comm c b], by linarith [hc.2.2.1, abs_sub_comm d c, abs_sub_comm b a, abs_sub_comm d b, abs_sub_comm c a], by linarith [hc.2.2.2.1, abs_sub_comm d b, abs_sub_comm c a, abs_sub_comm d a, abs_sub_comm c b], by linarith [hc.2.2.2.2.1, abs_sub_comm d c, abs_sub_comm b a, abs_sub_comm d a, abs_sub_comm c b], by linarith [hc.2.2.2.2.2, abs_sub_comm d b, abs_sub_comm c a, abs_sub_comm d a, abs_sub_comm c b]⟩ · have hc := hcore c d a b hd h3 ha h1 hb h2 dsimp only [u1, u2, u3] dsimp only at hc exact ⟨by linarith [hc.1, abs_sub_comm c a, abs_sub_comm c b, abs_sub_comm d a, abs_sub_comm d b], by linarith [hc.2.1, abs_sub_comm c a, abs_sub_comm c b, abs_sub_comm d a, abs_sub_comm d b], by linarith [hc.2.2.1, abs_sub_comm c a, abs_sub_comm c b, abs_sub_comm d a, abs_sub_comm d b], by linarith [hc.2.2.2.1, abs_sub_comm c a, abs_sub_comm c b, abs_sub_comm d a, abs_sub_comm d b], by linarith [hc.2.2.2.2.1, abs_sub_comm c a, abs_sub_comm c b, abs_sub_comm d a, abs_sub_comm d b], by linarith [hc.2.2.2.2.2, abs_sub_comm c a, abs_sub_comm c b, abs_sub_comm d a, abs_sub_comm d b]⟩ · have hc := hcore b a d c ha h1 hd h3 hc h2 dsimp only [u1, u2, u3] dsimp only at hc exact ⟨by linarith [hc.1, abs_sub_comm b a, abs_sub_comm d c, abs_sub_comm b d, abs_sub_comm b c, abs_sub_comm a c, abs_sub_comm a d], by linarith [hc.2.1, abs_sub_comm b a, abs_sub_comm d c, abs_sub_comm b d, abs_sub_comm b c, abs_sub_comm a c, abs_sub_comm a d], by linarith [hc.2.2.1, abs_sub_comm b a, abs_sub_comm d c, abs_sub_comm b d, abs_sub_comm b c, abs_sub_comm a c, abs_sub_comm a d], by linarith [hc.2.2.2.1, abs_sub_comm b a, abs_sub_comm d c, abs_sub_comm b d, abs_sub_comm b c, abs_sub_comm a c, abs_sub_comm a d], by linarith [hc.2.2.2.2.1, abs_sub_comm b a, abs_sub_comm d c, abs_sub_comm b d, abs_sub_comm b c, abs_sub_comm a c, abs_sub_comm a d], by linarith [hc.2.2.2.2.2, abs_sub_comm b a, abs_sub_comm d c, abs_sub_comm b d, abs_sub_comm b c, abs_sub_comm a c, abs_sub_comm a d]⟩ · exact hcore a b c d hb h1 hc h2 hd h3 /-- **THEOREM (Global Exact 4-Point Hyperbolicity `δ_4(L_∞) = 1`)**: The unbounded geodesic space `LSpace = ([0,∞)×[0,1]) ∪ ([0,1]×[0,∞))` in `ℓ₁` is globally `1`-hyperbolic under the 4-point condition! -/ theorem lSpace_fourPoint_one : IsFourPointHyp lSpaceDist 1 := by intro p q r s set U1 := |p.1.1 - q.1.1| + |r.1.1 - s.1.1| set U2 := |p.1.1 - r.1.1| + |q.1.1 - s.1.1| set U3 := |p.1.1 - s.1.1| + |q.1.1 - r.1.1| set V1 := |p.1.2 - q.1.2| + |r.1.2 - s.1.2| set V2 := |p.1.2 - r.1.2| + |q.1.2 - s.1.2| set V3 := |p.1.2 - s.1.2| + |q.1.2 - r.1.2| have hgoal_eq : ∀ (h : U1 + V1 ≤ max (U2 + V2) (U3 + V3) + 2 * 1), lSpaceDist p q + lSpaceDist r s ≤ max (lSpaceDist p r + lSpaceDist q s) (lSpaceDist p s + lSpaceDist q r) + 2 * 1 := by intro h have e1 : lSpaceDist p q + lSpaceDist r s = U1 + V1 := by unfold lSpaceDist; ring have e2 : lSpaceDist p r + lSpaceDist q s = U2 + V2 := by unfold lSpaceDist; ring have e3 : lSpaceDist p s + lSpaceDist q r = U3 + V3 := by unfold lSpaceDist; ring rw [e1, e2, e3]; exact h apply hgoal_eq have hU := real_four_sums_gap p.1.1 q.1.1 r.1.1 s.1.1 have hV := real_four_sums_gap p.1.2 q.1.2 r.1.2 s.1.2 by_cases hx3 : (p.1.1 ≤ 1 ∧ q.1.1 ≤ 1 ∧ r.1.1 ≤ 1) ∨ (p.1.1 ≤ 1 ∧ q.1.1 ≤ 1 ∧ s.1.1 ≤ 1) ∨ (p.1.1 ≤ 1 ∧ r.1.1 ≤ 1 ∧ s.1.1 ≤ 1) ∨ (q.1.1 ≤ 1 ∧ r.1.1 ≤ 1 ∧ s.1.1 ≤ 1) · obtain ⟨g12, g13, _, _, _, _⟩ := four_reals_three_le_one p.2.1 q.2.1 r.2.1 s.2.1 hx3 rcases hU with ⟨hU1, hU2⟩ | ⟨hU1, hU2⟩ | ⟨hU1, hU2⟩ <;> rcases hV with ⟨hV1, hV2⟩ | ⟨hV1, hV2⟩ | ⟨hV1, hV2⟩ <;> first | linarith [le_max_left (U2 + V2) (U3 + V3), g12, g13] | linarith [le_max_right (U2 + V2) (U3 + V3), g12, g13] · by_cases hy3 : (p.1.2 ≤ 1 ∧ q.1.2 ≤ 1 ∧ r.1.2 ≤ 1) ∨ (p.1.2 ≤ 1 ∧ q.1.2 ≤ 1 ∧ s.1.2 ≤ 1) ∨ (p.1.2 ≤ 1 ∧ r.1.2 ≤ 1 ∧ s.1.2 ≤ 1) ∨ (q.1.2 ≤ 1 ∧ r.1.2 ≤ 1 ∧ s.1.2 ≤ 1) · obtain ⟨g12, g13, _, _, _, _⟩ := four_reals_three_le_one p.2.2.1 q.2.2.1 r.2.2.1 s.2.2.1 hy3 rcases hU with ⟨hU1, hU2⟩ | ⟨hU1, hU2⟩ | ⟨hU1, hU2⟩ <;> rcases hV with ⟨hV1, hV2⟩ | ⟨hV1, hV2⟩ | ⟨hV1, hV2⟩ <;> first | linarith [le_max_left (U2 + V2) (U3 + V3), g12, g13] | linarith [le_max_right (U2 + V2) (U3 + V3), g12, g13] · have hp := p.2.2.2; have hq := q.2.2.2; have hr := r.2.2.2; have hs := s.2.2.2 have hsame_min : ∀ (a₁ a₂ b₁ b₂ : ℝ), b₁ ≤ 1 → b₂ ≤ 1 → 1 < a₁ → 1 < a₂ → |a₁ - b₁| + |a₂ - b₂| = |a₁ - b₂| + |a₂ - b₁| := by intro a₁ a₂ b₁ b₂ hb1 hb2 ha1 ha2 rw [abs_of_pos (by linarith), abs_of_pos (by linarith), abs_of_pos (by linarith), abs_of_pos (by linarith)]; ring have hcross_ge : ∀ (a₁ a₂ b₁ b₂ : ℝ), b₁ ≤ 1 → b₂ ≤ 1 → 1 < a₁ → 1 < a₂ → |a₁ - a₂| + |b₁ - b₂| ≤ |a₁ - b₁| + |a₂ - b₂| := by intro a₁ a₂ b₁ b₂ hb1 hb2 ha1 ha2 rw [abs_of_pos (by linarith : 0 < a₁ - b₁), abs_of_pos (by linarith : 0 < a₂ - b₂)] rcases le_total a₁ a₂ with h1 | h1 <;> rcases le_total b₁ b₂ with h2 | h2 · rw [abs_of_nonpos (by linarith), abs_of_nonpos (by linarith)]; linarith · rw [abs_of_nonpos (by linarith), abs_of_nonneg (by linarith)]; linarith · rw [abs_of_nonneg (by linarith), abs_of_nonpos (by linarith)]; linarith · rw [abs_of_nonneg (by linarith), abs_of_nonneg (by linarith)]; linarith -- Since neither `hx3` nor `hy3` holds, EXACTLY TWO of `{p,q,r,s}` have `.1 ≤ 1` (and the other two have `.2 ≤ 1`)! have h6 : (p.1.1 ≤ 1 ∧ q.1.1 ≤ 1 ∧ 1 < r.1.1 ∧ 1 < s.1.1) ∨ (p.1.1 ≤ 1 ∧ 1 < q.1.1 ∧ r.1.1 ≤ 1 ∧ 1 < s.1.1) ∨ (p.1.1 ≤ 1 ∧ 1 < q.1.1 ∧ 1 < r.1.1 ∧ s.1.1 ≤ 1) ∨ (1 < p.1.1 ∧ q.1.1 ≤ 1 ∧ r.1.1 ≤ 1 ∧ 1 < s.1.1) ∨ (1 < p.1.1 ∧ q.1.1 ≤ 1 ∧ 1 < r.1.1 ∧ s.1.1 ≤ 1) ∨ (1 < p.1.1 ∧ 1 < q.1.1 ∧ r.1.1 ≤ 1 ∧ s.1.1 ≤ 1) := by by_cases hp1 : p.1.1 ≤ 1 · by_cases hq1 : q.1.1 ≤ 1 · have hr1 : ¬r.1.1 ≤ 1 := fun h => hx3 (Or.inl ⟨hp1, hq1, h⟩) have hs1 : ¬s.1.1 ≤ 1 := fun h => hx3 (Or.inr (Or.inl ⟨hp1, hq1, h⟩)) exact Or.inl ⟨hp1, hq1, not_le.mp hr1, not_le.mp hs1⟩ · by_cases hr1 : r.1.1 ≤ 1 · have hs1 : ¬s.1.1 ≤ 1 := fun h => hx3 (Or.inr (Or.inr (Or.inl ⟨hp1, hr1, h⟩))) exact Or.inr (Or.inl ⟨hp1, not_le.mp hq1, hr1, not_le.mp hs1⟩) · by_cases hs1 : s.1.1 ≤ 1 · exact Or.inr (Or.inr (Or.inl ⟨hp1, not_le.mp hq1, not_le.mp hr1, hs1⟩)) · exfalso; exact hy3 (Or.inr (Or.inr (Or.inr ⟨hq.resolve_left hq1, hr.resolve_left hr1, hs.resolve_left hs1⟩))) · by_cases hq1 : q.1.1 ≤ 1 · by_cases hr1 : r.1.1 ≤ 1 · have hs1 : ¬s.1.1 ≤ 1 := fun h => hx3 (Or.inr (Or.inr (Or.inr ⟨hq1, hr1, h⟩))) exact Or.inr (Or.inr (Or.inr (Or.inl ⟨not_le.mp hp1, hq1, hr1, not_le.mp hs1⟩))) · by_cases hs1 : s.1.1 ≤ 1 · exact Or.inr (Or.inr (Or.inr (Or.inr (Or.inl ⟨not_le.mp hp1, hq1, not_le.mp hr1, hs1⟩)))) · exfalso; exact hy3 (Or.inr (Or.inr (Or.inl ⟨hp.resolve_left hp1, hr.resolve_left hr1, hs.resolve_left hs1⟩))) · by_cases hr1 : r.1.1 ≤ 1 · by_cases hs1 : s.1.1 ≤ 1 · exact Or.inr (Or.inr (Or.inr (Or.inr (Or.inr ⟨not_le.mp hp1, not_le.mp hq1, hr1, hs1⟩)))) · exfalso; exact hy3 (Or.inr (Or.inl ⟨hp.resolve_left hp1, hq.resolve_left hq1, hs.resolve_left hs1⟩)) · exfalso; exact hy3 (Or.inl ⟨hp.resolve_left hp1, hq.resolve_left hq1, hr.resolve_left hr1⟩) rcases h6 with ⟨hp1, hq1, hr1, hs1⟩ | ⟨hp1, hq1, hr1, hs1⟩ | ⟨hp1, hq1, hr1, hs1⟩ | ⟨hp1, hq1, hr1, hs1⟩ | ⟨hp1, hq1, hr1, hs1⟩ | ⟨hp1, hq1, hr1, hs1⟩ · have hr2 : r.1.2 ≤ 1 := hr.resolve_left (not_le.mpr hr1) have hs2 : s.1.2 ≤ 1 := hs.resolve_left (not_le.mpr hs1) have hp2 : 1 < p.1.2 := not_le.mp (fun h => hy3 (Or.inr (Or.inr (Or.inl ⟨h, hr2, hs2⟩)))) have hq2 : 1 < q.1.2 := not_le.mp (fun h => hy3 (Or.inr (Or.inr (Or.inr ⟨h, hr2, hs2⟩)))) have h1 := hcross_ge r.1.1 s.1.1 p.1.1 q.1.1 hp1 hq1 hr1 hs1 have h2 := hcross_ge p.1.2 q.1.2 r.1.2 s.1.2 hr2 hs2 hp2 hq2 rw [abs_sub_comm r.1.1 p.1.1, abs_sub_comm s.1.1 q.1.1] at h1 linarith [le_max_left (U2 + V2) (U3 + V3)] · have hq2 : q.1.2 ≤ 1 := hq.resolve_left (not_le.mpr hq1) have hs2 : s.1.2 ≤ 1 := hs.resolve_left (not_le.mpr hs1) have hp2 : 1 < p.1.2 := not_le.mp (fun h => hy3 (Or.inr (Or.inl ⟨h, hq2, hs2⟩))) have hr2 : 1 < r.1.2 := not_le.mp (fun h => hy3 (Or.inr (Or.inr (Or.inr ⟨hq2, h, hs2⟩)))) have h1 := hsame_min q.1.1 s.1.1 p.1.1 r.1.1 hp1 hr1 hq1 hs1 have h2 := hsame_min p.1.2 r.1.2 q.1.2 s.1.2 hq2 hs2 hp2 hr2 rw [abs_sub_comm q.1.1 p.1.1, abs_sub_comm s.1.1 r.1.1, abs_sub_comm s.1.1 p.1.1] at h1 rw [abs_sub_comm r.1.2 q.1.2] at h2 linarith [le_max_right (U2 + V2) (U3 + V3)] · have hq2 : q.1.2 ≤ 1 := hq.resolve_left (not_le.mpr hq1) have hr2 : r.1.2 ≤ 1 := hr.resolve_left (not_le.mpr hr1) have hp2 : 1 < p.1.2 := not_le.mp (fun h => hy3 (Or.inl ⟨h, hq2, hr2⟩)) have hs2 : 1 < s.1.2 := not_le.mp (fun h => hy3 (Or.inr (Or.inr (Or.inr ⟨hq2, hr2, h⟩)))) have h1 := hsame_min q.1.1 r.1.1 p.1.1 s.1.1 hp1 hs1 hq1 hr1 have h2 := hsame_min p.1.2 s.1.2 q.1.2 r.1.2 hq2 hr2 hp2 hs2 rw [abs_sub_comm q.1.1 p.1.1, abs_sub_comm r.1.1 p.1.1] at h1 rw [abs_sub_comm s.1.2 r.1.2, abs_sub_comm s.1.2 q.1.2] at h2 linarith [le_max_left (U2 + V2) (U3 + V3)] · have hp2 : p.1.2 ≤ 1 := hp.resolve_left (not_le.mpr hp1) have hs2 : s.1.2 ≤ 1 := hs.resolve_left (not_le.mpr hs1) have hq2 : 1 < q.1.2 := not_le.mp (fun h => hy3 (Or.inr (Or.inl ⟨hp2, h, hs2⟩))) have hr2 : 1 < r.1.2 := not_le.mp (fun h => hy3 (Or.inr (Or.inr (Or.inl ⟨hp2, h, hs2⟩)))) have h1 := hsame_min p.1.1 s.1.1 q.1.1 r.1.1 hq1 hr1 hp1 hs1 have h2 := hsame_min q.1.2 r.1.2 p.1.2 s.1.2 hp2 hs2 hq2 hr2 rw [abs_sub_comm s.1.1 r.1.1, abs_sub_comm s.1.1 q.1.1] at h1 rw [abs_sub_comm q.1.2 p.1.2, abs_sub_comm r.1.2 p.1.2] at h2 linarith [le_max_left (U2 + V2) (U3 + V3)] · have hp2 : p.1.2 ≤ 1 := hp.resolve_left (not_le.mpr hp1) have hr2 : r.1.2 ≤ 1 := hr.resolve_left (not_le.mpr hr1) have hq2 : 1 < q.1.2 := not_le.mp (fun h => hy3 (Or.inl ⟨hp2, h, hr2⟩)) have hs2 : 1 < s.1.2 := not_le.mp (fun h => hy3 (Or.inr (Or.inr (Or.inl ⟨hp2, hr2, h⟩)))) have h1 := hsame_min p.1.1 r.1.1 q.1.1 s.1.1 hq1 hs1 hp1 hr1 have h2 := hsame_min q.1.2 s.1.2 p.1.2 r.1.2 hp2 hr2 hq2 hs2 rw [abs_sub_comm r.1.1 q.1.1] at h1 rw [abs_sub_comm q.1.2 p.1.2, abs_sub_comm s.1.2 r.1.2, abs_sub_comm s.1.2 p.1.2] at h2 linarith [le_max_right (U2 + V2) (U3 + V3)] · have hp2 : p.1.2 ≤ 1 := hp.resolve_left (not_le.mpr hp1) have hq2 : q.1.2 ≤ 1 := hq.resolve_left (not_le.mpr hq1) have hr2 : 1 < r.1.2 := not_le.mp (fun h => hy3 (Or.inl ⟨hp2, hq2, h⟩)) have hs2 : 1 < s.1.2 := not_le.mp (fun h => hy3 (Or.inr (Or.inl ⟨hp2, hq2, h⟩))) have h1 := hcross_ge p.1.1 q.1.1 r.1.1 s.1.1 hr1 hs1 hp1 hq1 have h2 := hcross_ge r.1.2 s.1.2 p.1.2 q.1.2 hp2 hq2 hr2 hs2 rw [abs_sub_comm r.1.2 p.1.2, abs_sub_comm s.1.2 q.1.2] at h2 linarith [le_max_left (U2 + V2) (U3 + V3)] /-- The sharp witness geodesic triangle `Δ*` in `LSpace` with vertices `(0, 0), (3, 1), (1, 3)`: - side `xy`: `(t, 0)` on `[0, 2]`, `(2 + (t-2)/2, (t-2)/2)` on `[2, 4]`; - side `xz`: `(0, t)` on `[0, 2]`, `((t-2)/2, 2 + (t-2)/2)` on `[2, 4]`; - side `yz`: `(3 - t, 1)` on `[0, 2]`, `(1, t - 1)` on `[2, 4]`. -/ def lPt0 : LSpace := ⟨(0, 0), by norm_num⟩ def lPtY : LSpace := ⟨(3, 1), by norm_num⟩ def lPtZ : LSpace := ⟨(1, 3), by norm_num⟩ noncomputable def lSegXY : GeodesicSeg lSpaceDist lPt0 lPtY where γ t := if h : t ≤ 2 then ⟨(max 0 t, 0), by refine ⟨le_max_left _ _, le_rfl, Or.inr (by norm_num)⟩⟩ else ⟨(2 + min 1 ((t - 2) / 2), min 1 ((t - 2) / 2)), by have h0 : 0 ≤ min 1 ((t - 2) / 2) := le_min (by norm_num) (by linarith) have h1 : min 1 ((t - 2) / 2) ≤ 1 := min_le_left _ _ exact ⟨by linarith, h0, Or.inr h1⟩⟩ start := by apply Subtype.ext; simp [lPt0] stop := by have hd : lSpaceDist lPt0 lPtY = 4 := by norm_num [lSpaceDist, lPt0, lPtY] rw [hd]; apply Subtype.ext; simp only [show ¬((4 : ℝ) ≤ 2) by norm_num, ↓reduceDIte, lPtY]; norm_num isom s t hs0 hs1 ht0 ht1 := by have hd : lSpaceDist lPt0 lPtY = 4 := by norm_num [lSpaceDist, lPt0, lPtY] rw [hd] at hs1 ht1 dsimp only [lSpaceDist] by_cases hs : s ≤ 2 <;> by_cases ht : t ≤ 2 <;> simp only [hs, ht, ↓reduceDIte] · rw [max_eq_right hs0, max_eq_right ht0]; simp · rw [max_eq_right hs0, min_eq_right (by linarith : (t - 2) / 2 ≤ 1)] simp only [zero_sub, abs_neg] rw [abs_of_nonpos (by linarith), abs_of_nonneg (by linarith), abs_of_nonpos (by linarith)]; ring · rw [max_eq_right ht0, min_eq_right (by linarith : (s - 2) / 2 ≤ 1)] simp only [sub_zero] rw [abs_of_nonneg (by linarith), abs_of_nonneg (by linarith), abs_of_pos (by linarith)]; ring · rw [min_eq_right (by linarith : (s - 2) / 2 ≤ 1), min_eq_right (by linarith : (t - 2) / 2 ≤ 1)] rw [show 2 + (s - 2) / 2 - (2 + (t - 2) / 2) = (s - t) / 2 by ring, show (s - 2) / 2 - (t - 2) / 2 = (s - t) / 2 by ring, abs_div, abs_of_pos (by norm_num : (0 : ℝ) < 2)]; ring noncomputable def lSegXZ : GeodesicSeg lSpaceDist lPt0 lPtZ where γ t := if h : t ≤ 2 then ⟨(0, max 0 t), by refine ⟨le_rfl, le_max_left _ _, Or.inl (by norm_num)⟩⟩ else ⟨(min 1 ((t - 2) / 2), 2 + min 1 ((t - 2) / 2)), by have h0 : 0 ≤ min 1 ((t - 2) / 2) := le_min (by norm_num) (by linarith) have h1 : min 1 ((t - 2) / 2) ≤ 1 := min_le_left _ _ exact ⟨h0, by linarith, Or.inl h1⟩⟩ start := by apply Subtype.ext; simp [lPt0] stop := by have hd : lSpaceDist lPt0 lPtZ = 4 := by norm_num [lSpaceDist, lPt0, lPtZ] rw [hd]; apply Subtype.ext; simp only [show ¬((4 : ℝ) ≤ 2) by norm_num, ↓reduceDIte, lPtZ]; norm_num isom s t hs0 hs1 ht0 ht1 := by have hd : lSpaceDist lPt0 lPtZ = 4 := by norm_num [lSpaceDist, lPt0, lPtZ] rw [hd] at hs1 ht1 dsimp only [lSpaceDist] by_cases hs : s ≤ 2 <;> by_cases ht : t ≤ 2 <;> simp only [hs, ht, ↓reduceDIte] · rw [max_eq_right hs0, max_eq_right ht0]; simp · rw [max_eq_right hs0, min_eq_right (by linarith : (t - 2) / 2 ≤ 1)] simp only [zero_sub, abs_neg] rw [abs_of_nonneg (by linarith), abs_of_nonpos (by linarith), abs_of_nonpos (by linarith)]; ring · rw [max_eq_right ht0, min_eq_right (by linarith : (s - 2) / 2 ≤ 1)] simp only [sub_zero] rw [abs_of_nonneg (by linarith), abs_of_nonneg (by linarith), abs_of_pos (by linarith)]; ring · rw [min_eq_right (by linarith : (s - 2) / 2 ≤ 1), min_eq_right (by linarith : (t - 2) / 2 ≤ 1)] rw [show 2 + (s - 2) / 2 - (2 + (t - 2) / 2) = (s - t) / 2 by ring, show (s - 2) / 2 - (t - 2) / 2 = (s - t) / 2 by ring, abs_div, abs_of_pos (by norm_num : (0 : ℝ) < 2)]; ring noncomputable def lSegYZ : GeodesicSeg lSpaceDist lPtY lPtZ where γ t := if h : t ≤ 2 then ⟨(3 - max 0 t, 1), by have : max 0 t ≤ 2 := max_le (by norm_num) h exact ⟨by linarith, by norm_num, Or.inr le_rfl⟩⟩ else ⟨(1, 1 + min 2 (t - 2)), by have : 0 ≤ min 2 (t - 2) := le_min (by norm_num) (by linarith) exact ⟨by norm_num, by linarith, Or.inl le_rfl⟩⟩ start := by apply Subtype.ext; simp [lPtY] stop := by have hd : lSpaceDist lPtY lPtZ = 4 := by norm_num [lSpaceDist, lPtY, lPtZ] rw [hd]; apply Subtype.ext; simp only [show ¬((4 : ℝ) ≤ 2) by norm_num, ↓reduceDIte, lPtZ]; norm_num isom s t hs0 hs1 ht0 ht1 := by have hd : lSpaceDist lPtY lPtZ = 4 := by norm_num [lSpaceDist, lPtY, lPtZ] rw [hd] at hs1 ht1 dsimp only [lSpaceDist] by_cases hs : s ≤ 2 <;> by_cases ht : t ≤ 2 <;> simp only [hs, ht, ↓reduceDIte] · rw [max_eq_right hs0, max_eq_right ht0] simp only [sub_self, abs_zero, add_zero] rw [show 3 - s - (3 - t) = -(s - t) by ring, abs_neg] · rw [max_eq_right hs0, min_eq_right (by linarith : t - 2 ≤ 2)] rw [abs_of_nonneg (by linarith), abs_of_nonpos (by linarith), abs_of_nonpos (by linarith)]; ring · rw [max_eq_right ht0, min_eq_right (by linarith : s - 2 ≤ 2)] rw [abs_of_nonpos (by linarith), abs_of_nonneg (by linarith), abs_of_pos (by linarith)]; ring · rw [min_eq_right (by linarith : s - 2 ≤ 2), min_eq_right (by linarith : t - 2 ≤ 2)] simp only [sub_self, abs_zero, zero_add] rw [show 1 + (s - 2) - (1 + (t - 2)) = s - t by ring] noncomputable def lSpaceWitnessTri : GeodesicTri lSpaceDist lPt0 lPtY lPtZ := ⟨lSegXY, lSegXZ, lSegYZ⟩ /-- **THEOREM (Exact Factor-4 Optimality Witness in `LSpace`)**: The geodesic triangle `lSpaceWitnessTri` inside the globally `1`-hyperbolic geodesic space `LSpace`: 1. Is **1-slim** (`IsSlimTri lSpaceWitnessTri 1`); 2. Has **insize = 4**, **thinness = 4**, and **tripod distortion = 4**! Therefore NO constant strictly smaller than `4` can replace `4` in: `δ_ins ≤ 4 δ_4`, `δ_thin ≤ 4 δ_4`, `δ_ins(Δ) ≤ 4 δ_slim(Δ)`, `δ_thin(Δ) ≤ 4 δ_slim(Δ)`! -/ theorem lSpaceWitnessTri_exact_factor_four : IsFourPointHyp lSpaceDist 1 ∧ IsSlimTri lSpaceWitnessTri 1 ∧ (∀ δ, IsInsizeTri lSpaceWitnessTri δ → 4 ≤ δ) ∧ (∀ δ, IsThinTri lSpaceWitnessTri δ → 4 ≤ δ) := by have hd0Y : lSpaceDist lPt0 lPtY = 4 := by norm_num [lSpaceDist, lPt0, lPtY] have hd0Z : lSpaceDist lPt0 lPtZ = 4 := by norm_num [lSpaceDist, lPt0, lPtZ] have hdYZ : lSpaceDist lPtY lPtZ = 4 := by norm_num [lSpaceDist, lPtY, lPtZ] have hgp : gromovProd lSpaceDist lPt0 lPtY lPtZ = 2 := by unfold gromovProd; rw [lSpaceDist_isPseudoMetricFn.symm lPtY lPt0, lSpaceDist_isPseudoMetricFn.symm lPtZ lPt0, hd0Y, hd0Z, hdYZ]; norm_num have hdist_ins : lSpaceDist (lSpaceWitnessTri.xy.γ 2) (lSpaceWitnessTri.xz.γ 2) = 4 := by simp [lSpaceWitnessTri, lSegXY, lSegXZ, lSpaceDist]; norm_num refine ⟨lSpace_fourPoint_one, ?_, ?_, ?_⟩ · -- Prove `IsSlimTri lSpaceWitnessTri 1`! refine ⟨?_, ?_, ?_⟩ · -- Side `xy` intro t ht0 ht1 rw [hd0Y] at ht1 by_cases h1 : t ≤ 1 · left; refine ⟨0, le_rfl, by rw [hd0Z]; norm_num, ?_⟩ simp only [lSpaceWitnessTri, lSegXY, lSegXZ, lSpaceDist, show t ≤ 2 by linarith, show (0 : ℝ) ≤ 2 by norm_num, ↓reduceDIte, max_eq_right ht0, max_self, sub_zero, sub_self, abs_zero, add_zero, abs_of_nonneg ht0] exact h1 · by_cases h2 : t ≤ 2 · -- `t ∈ (1, 2]`: point `(t, 0)` on `xy` is at distance `1` from `(t, 1) = yz(3 - t)`! right; refine ⟨3 - t, by linarith, by rw [hdYZ]; linarith, ?_⟩ simp only [lSpaceWitnessTri, lSegXY, lSegYZ, lSpaceDist, h2, show 3 - t ≤ 2 by linarith, ↓reduceDIte, max_eq_right ht0, max_eq_right (by linarith : 0 ≤ 3 - t)] norm_num · -- `t ∈ (2, 4]`: point `(2 + u, u)` (`u = (t-2)/2 ∈ (0, 1]`) has dist `1 - u ≤ 1` to `(2 + u, 1) = yz(1 - u)`! right; refine ⟨1 - (t - 2) / 2, by linarith, by rw [hdYZ]; linarith, ?_⟩ simp only [lSpaceWitnessTri, lSegXY, lSegYZ, lSpaceDist, h2, show 1 - (t - 2) / 2 ≤ 2 by linarith, ↓reduceDIte, min_eq_right (by linarith : (t - 2) / 2 ≤ 1), max_eq_right (by linarith : 0 ≤ 1 - (t - 2) / 2)] rw [show 2 + (t - 2) / 2 - (3 - (1 - (t - 2) / 2)) = 0 by ring, abs_zero, zero_add, abs_of_nonpos (by linarith)]; linarith · -- Side `xz` (symmetric!) intro t ht0 ht1 rw [hd0Z] at ht1 by_cases h1 : t ≤ 1 · left; refine ⟨0, le_rfl, by rw [hd0Y]; norm_num, ?_⟩ simp only [lSpaceWitnessTri, lSegXY, lSegXZ, lSpaceDist, show t ≤ 2 by linarith, show (0 : ℝ) ≤ 2 by norm_num, ↓reduceDIte, max_eq_right ht0, max_self, sub_zero, sub_self, abs_zero, zero_add, abs_of_nonneg ht0] exact h1 · by_cases h2 : t ≤ 2 · right; refine ⟨t + 1, by linarith, by rw [hdYZ]; linarith, ?_⟩ simp only [lSpaceWitnessTri, lSegXZ, lSegYZ, lSpaceDist, h2, show ¬(t + 1 ≤ 2) by linarith, ↓reduceDIte, max_eq_right ht0, min_eq_right (by linarith : t + 1 - 2 ≤ 2)] rw [show t - (1 + (t + 1 - 2)) = 0 by ring, abs_zero, add_zero]; norm_num · right; refine ⟨3 + (t - 2) / 2, by linarith, by rw [hdYZ]; linarith, ?_⟩ simp only [lSpaceWitnessTri, lSegXZ, lSegYZ, lSpaceDist, h2, show ¬(3 + (t - 2) / 2 ≤ 2) by linarith, ↓reduceDIte, min_eq_right (by linarith : (t - 2) / 2 ≤ 1), min_eq_right (by linarith : 3 + (t - 2) / 2 - 2 ≤ 2)] rw [show 2 + (t - 2) / 2 - (1 + (3 + (t - 2) / 2 - 2)) = 0 by ring, abs_zero, add_zero, abs_of_nonpos (by linarith)]; linarith · -- Side `yz` intro t ht0 ht1 rw [hdYZ] at ht1 by_cases h1 : t ≤ 1 · left; refine ⟨4 - 2 * t, by linarith, by rw [hd0Y]; linarith, ?_⟩ by_cases ht_eq : t = 1 · subst ht_eq simp only [lSpaceWitnessTri, lSegXY, lSegYZ, lSpaceDist, show (1 : ℝ) ≤ 2 by norm_num, show 4 - 2 * (1 : ℝ) ≤ 2 by norm_num, ↓reduceDIte] norm_num · have ht_lt : t < 1 := lt_of_le_of_ne h1 ht_eq simp only [lSpaceWitnessTri, lSegXY, lSegYZ, lSpaceDist, show t ≤ 2 by linarith, show ¬(4 - 2 * t ≤ 2) by linarith, ↓reduceDIte, max_eq_right ht0, min_eq_right (by linarith : (4 - 2 * t - 2) / 2 ≤ 1)] rw [show 3 - t - (2 + (4 - 2 * t - 2) / 2) = 0 by ring, abs_zero, zero_add, show 1 - (4 - 2 * t - 2) / 2 = t by ring, abs_of_nonneg ht0] exact h1 · by_cases h2 : t ≤ 2 · left; refine ⟨3 - t, by linarith, by rw [hd0Y]; linarith, ?_⟩ simp only [lSpaceWitnessTri, lSegXY, lSegYZ, lSpaceDist, h2, show 3 - t ≤ 2 by linarith, ↓reduceDIte, max_eq_right ht0, max_eq_right (by linarith : 0 ≤ 3 - t)] norm_num · by_cases h3 : t ≤ 3 · right; refine ⟨t - 1, by linarith, by rw [hd0Z]; linarith, ?_⟩ simp only [lSpaceWitnessTri, lSegXZ, lSegYZ, lSpaceDist, h2, show t - 1 ≤ 2 by linarith, ↓reduceDIte, min_eq_right (by linarith : t - 2 ≤ 2), max_eq_right (by linarith : 0 ≤ t - 1)] rw [show 1 + (t - 2) - (t - 1) = 0 by ring, abs_zero, add_zero]; norm_num · right; refine ⟨2 * t - 4, by linarith, by rw [hd0Z]; linarith, ?_⟩ simp only [lSpaceWitnessTri, lSegXZ, lSegYZ, lSpaceDist, h2, show ¬(2 * t - 4 ≤ 2) by linarith, ↓reduceDIte, min_eq_right (by linarith : t - 2 ≤ 2), min_eq_right (by linarith : (2 * t - 4 - 2) / 2 ≤ 1)] rw [show 1 + (t - 2) - (2 + (2 * t - 4 - 2) / 2) = 0 by ring, abs_zero, add_zero, show 1 - (2 * t - 4 - 2) / 2 = 4 - t by ring, abs_of_nonneg (by linarith)] linarith · intro δ hins have := hins.1; rw [hgp] at this; linarith · intro δ hthin have := hthin.1 2 (by norm_num) (by rw [hgp]); linarith /-! ## Section 6: Sharp Separation Witness 2 — Unbounded ℓ_∞ Strip (`δ_4 = 1/2`, `δ_slim = 1 = 2 δ_4`) -/ /-- The unbounded `ℓ_∞` strip `[0, 1] × ℝ`. -/ def LinfStrip : Type := { p : ℝ × ℝ // 0 ≤ p.1 ∧ p.1 ≤ 1 } def linfStripDist (p q : LinfStrip) : ℝ := max |p.1.1 - q.1.1| |p.1.2 - q.1.2| lemma linfStripDist_isPseudoMetricFn : IsPseudoMetricFn linfStripDist where nonneg p q := le_trans (abs_nonneg _) (le_max_left _ _) self p := by simp [linfStripDist] symm p q := by simp [linfStripDist, abs_sub_comm] triangle p q r := by unfold linfStripDist refine max_le ?_ ?_ · have h : |p.1.1 - r.1.1| ≤ |p.1.1 - q.1.1| + |q.1.1 - r.1.1| := by have : p.1.1 - r.1.1 = (p.1.1 - q.1.1) + (q.1.1 - r.1.1) := by ring rw [this]; exact abs_add_le _ _ linarith [le_max_left |p.1.1 - q.1.1| |p.1.2 - q.1.2|, le_max_left |q.1.1 - r.1.1| |q.1.2 - r.1.2|] · have h : |p.1.2 - r.1.2| ≤ |p.1.2 - q.1.2| + |q.1.2 - r.1.2| := by have : p.1.2 - r.1.2 = (p.1.2 - q.1.2) + (q.1.2 - r.1.2) := by ring rw [this]; exact abs_add_le _ _ linarith [le_max_right |p.1.1 - q.1.1| |p.1.2 - q.1.2|, le_max_right |q.1.1 - r.1.1| |q.1.2 - r.1.2|] /-- **THEOREM (Exact `δ_4 = 1/2` and `δ_slim ≥ 1 = 2 δ_4` on the Unbounded `ℓ_∞` Strip)**: -/ theorem linfStrip_exact_two_factor : IsFourPointHyp linfStripDist (1 / 2) ∧ (∀ δ, IsFourPointHyp linfStripDist δ → 1 / 2 ≤ δ) ∧ (∃ (x y z : LinfStrip) (Δ : GeodesicTri linfStripDist x y z), ∀ δ, IsSlimTri Δ δ → 1 ≤ δ) := by refine ⟨?_, ?_, ?_⟩ · -- Global `δ_4 ≤ 1/2`: notice `|p.2 - q.2| ≤ d(p, q) ≤ max(|p.2 - q.2|, 1)`! intro p q r s have hband : ∀ u v : LinfStrip, |u.1.2 - v.1.2| ≤ linfStripDist u v ∧ linfStripDist u v ≤ max |u.1.2 - v.1.2| 1 := fun u v => by unfold linfStripDist refine ⟨le_max_right _ _, max_le (le_trans ?_ (le_max_right _ _)) (le_max_left _ _)⟩ rw [abs_le]; constructor <;> linarith [u.2.1, u.2.2, v.2.1, v.2.2] have hV := real_four_sums_gap p.1.2 q.1.2 r.1.2 s.1.2 set a := |p.1.2 - q.1.2|; set b := |r.1.2 - s.1.2| set c := |p.1.2 - r.1.2|; set e := |q.1.2 - s.1.2| set f := |p.1.2 - s.1.2|; set g := |q.1.2 - r.1.2| have h1 := (hband p q).2; have h2 := (hband r s).2 have h3 := (hband p r).1; have h4 := (hband q s).1 have h5 := (hband p s).1; have h6 := (hband q r).1 have h_sum_bound : a + b ≤ max (c + e) (f + g) := by rcases hV with ⟨hV1, _⟩ | ⟨hV1, _⟩ | ⟨_, hV2⟩ · exact le_max_of_le_left (le_of_eq hV1) · exact le_max_of_le_right (le_of_eq hV1) · exact le_max_of_le_left hV2 -- Split on whether `a ≤ 1` and `b ≤ 1`: by_cases ha1 : a ≤ 1 <;> by_cases hb1 : b ≤ 1 · -- Both `a ≤ 1` and `b ≤ 1`! Need `max a 1 + max b 1 = 2 ≤ max (d pr + d qs) (d ps + d qr) + 1`, -- i.e. `1 ≤ max (d pr + d qs) (d ps + d qr)`! Wait: `d pr + d qs + d ps + d qr ≥ 2 d pq` — wait, -- if ALL four points are inside `[0, 1] × [y_0, y_0 + 1]`, the diameter is `1`, so `d pq + d rs ≤ 1 + 1 = 2`, -- AND `max(d pr + d qs, d ps + d qr) ≥ (d pq + d rs) / 2` ALWAYS by triangle inequality! -- Wait: `d pq ≤ d pr + d qr` and `d pq ≤ d ps + d qs`, `d rs ≤ d pr + d ps` and `d rs ≤ d qr + d qs`! -- Adding `(d pq + d rs) ≤ (d pr + d qs) + (d ps + d qr)` gives `max(d pr + d qs, d ps + d qr) ≥ (d pq + d rs) / 2`! -- Since `d pq ≤ 1` and `d rs ≤ 1`, `(d pq + d rs) / 2 ≤ 1`, so `d pq + d rs - max(...) ≤ (d pq + d rs) / 2 ≤ 1 = 2 * (1/2)`!! have hpq1 : linfStripDist p q ≤ 1 := le_trans h1 (max_le ha1 le_rfl) have hrs1 : linfStripDist r s ≤ 1 := le_trans h2 (max_le hb1 le_rfl) have t1 := linfStripDist_isPseudoMetricFn.triangle p r q have t2 := linfStripDist_isPseudoMetricFn.triangle r p s rw [linfStripDist_isPseudoMetricFn.symm r q] at t1 rw [linfStripDist_isPseudoMetricFn.symm r p] at t2 have t3 := linfStripDist_isPseudoMetricFn.triangle p s q have t4 := linfStripDist_isPseudoMetricFn.triangle r q s rw [linfStripDist_isPseudoMetricFn.symm s q] at t3 rw [linfStripDist_isPseudoMetricFn.symm r q] at t4 rcases le_total (linfStripDist p r + linfStripDist q s) (linfStripDist p s + linfStripDist q r) with h | h · linarith [le_max_right (linfStripDist p r + linfStripDist q s) (linfStripDist p s + linfStripDist q r)] · linarith [le_max_left (linfStripDist p r + linfStripDist q s) (linfStripDist p s + linfStripDist q r)] · rw [max_eq_right ha1] at h1 rw [max_eq_left (le_of_not_ge hb1)] at h2 have ha0 : 0 ≤ a := abs_nonneg _ rcases le_max_iff.mp h_sum_bound with hm | hm · linarith [le_max_left (linfStripDist p r + linfStripDist q s) (linfStripDist p s + linfStripDist q r)] · linarith [le_max_right (linfStripDist p r + linfStripDist q s) (linfStripDist p s + linfStripDist q r)] · rw [max_eq_left (le_of_not_ge ha1)] at h1 rw [max_eq_right hb1] at h2 have hb0 : 0 ≤ b := abs_nonneg _ rcases le_max_iff.mp h_sum_bound with hm | hm · linarith [le_max_left (linfStripDist p r + linfStripDist q s) (linfStripDist p s + linfStripDist q r)] · linarith [le_max_right (linfStripDist p r + linfStripDist q s) (linfStripDist p s + linfStripDist q r)] · rw [max_eq_left (le_of_not_ge ha1)] at h1 rw [max_eq_left (le_of_not_ge hb1)] at h2 rcases le_max_iff.mp h_sum_bound with hm | hm · linarith [le_max_left (linfStripDist p r + linfStripDist q s) (linfStripDist p s + linfStripDist q r)] · linarith [le_max_right (linfStripDist p r + linfStripDist q s) (linfStripDist p s + linfStripDist q r)] · intro δ hδ have h4 := hδ ⟨(0, -1), by norm_num⟩ ⟨(1, 1), by norm_num⟩ ⟨(0, 0), by norm_num⟩ ⟨(1, 0), by norm_num⟩ norm_num [linfStripDist] at h4 linarith · let x0 : LinfStrip := ⟨(0, 0), by norm_num⟩ let y0 : LinfStrip := ⟨(0, 2), by norm_num⟩ have hd0 : linfStripDist x0 y0 = 2 := by norm_num [linfStripDist, x0, y0] let g1 : GeodesicSeg linfStripDist x0 y0 := { γ := fun t => ⟨(max 0 (min t (2 - t)), t), by refine ⟨le_max_left _ _, max_le (by norm_num) ?_⟩ rcases le_total t (2 - t) with h | h · rw [min_eq_left h]; linarith · rw [min_eq_right h]; linarith⟩ start := by apply Subtype.ext; norm_num [x0] stop := by rw [hd0]; apply Subtype.ext; norm_num [y0] isom := fun s t hs0 hs1 ht0 ht1 => by rw [hd0] at hs1 ht1 dsimp only [linfStripDist] have hlip : |max 0 (min s (2 - s)) - max 0 (min t (2 - t))| ≤ |s - t| := by have hs_eq : max 0 (min s (2 - s)) = min s (2 - s) := max_eq_right (le_min hs0 (by linarith)) have ht_eq : max 0 (min t (2 - t)) = min t (2 - t) := max_eq_right (le_min ht0 (by linarith)) rw [hs_eq, ht_eq] rcases le_total s (2 - s) with hs | hs <;> rcases le_total t (2 - t) with ht | ht · rw [min_eq_left hs, min_eq_left ht] · rw [min_eq_left hs, min_eq_right ht, abs_le] constructor <;> linarith [le_abs_self (s - t), neg_le_abs (s - t)] · rw [min_eq_right hs, min_eq_left ht, abs_le] constructor <;> linarith [le_abs_self (s - t), neg_le_abs (s - t)] · rw [min_eq_right hs, min_eq_right ht, show (2 - s) - (2 - t) = -(s - t) by ring, abs_neg] exact max_eq_right hlip } let g2 : GeodesicSeg linfStripDist x0 y0 := { γ := fun t => ⟨(0, t), by norm_num⟩ start := rfl stop := by rw [hd0] isom := fun s t _ _ _ _ => by simp [linfStripDist] } let g0 : GeodesicSeg linfStripDist y0 y0 := { γ := fun _ => y0 start := rfl stop := rfl isom := fun s t hs0 hs1 ht0 ht1 => by have hself : linfStripDist y0 y0 = 0 := linfStripDist_isPseudoMetricFn.self y0 rw [hself] at hs1 ht1 have hs : s = 0 := le_antisymm hs1 hs0 have ht : t = 0 := le_antisymm ht1 ht0 subst hs; subst ht; simp [linfStripDist] } refine ⟨x0, y0, y0, ⟨g1, g2, g0⟩, fun δ hsl => ?_⟩ rcases hsl.1 1 (by norm_num) (by rw [hd0]; norm_num) with ⟨s, hs0, hs1, hds⟩ | ⟨s, hs0, hs1, hds⟩ · -- `g1(1) = (1, 1)` has `d((1, 1), (0, s)) = max(1, |1 - s|) ≥ 1`! dsimp only [g1, g2, linfStripDist] at hds norm_num at hds linarith [le_max_left (1 : ℝ) |1 - s|] · -- `g0(s) = (0, 2)` has `d((1, 1), (0, 2)) = 1`! dsimp only [g1, g0, y0, linfStripDist] at hds norm_num at hds linarith end HyperbolicityConversions #print axioms HyperbolicityConversions.tripodMap_oneLipschitz #print axioms HyperbolicityConversions.thin_iff_tripod #print axioms HyperbolicityConversions.insize_of_thin #print axioms HyperbolicityConversions.slim_of_thin #print axioms HyperbolicityConversions.thin_of_four_slim #print axioms HyperbolicityConversions.insize_of_four_slim #print axioms HyperbolicityConversions.fourPoint_of_insize_and_thin #print axioms HyperbolicityConversions.fourPoint_of_thin #print axioms HyperbolicityConversions.fourPoint_of_two_slim #print axioms HyperbolicityConversions.slim_of_three_fourPoint #print axioms HyperbolicityConversions.thin_of_four_fourPoint #print axioms HyperbolicityConversions.insize_of_four_fourPoint #print axioms HyperbolicityConversions.slim_and_thin_of_insize #print axioms HyperbolicityConversions.busemann_thin_iff_insize #print axioms HyperbolicityConversions.lSpace_isGeodesic #print axioms HyperbolicityConversions.lSpace_fourPoint_one #print axioms HyperbolicityConversions.lSpaceWitnessTri_exact_factor_four #print axioms HyperbolicityConversions.linfStrip_exact_two_factor