import Mathlib /-! # Exact Closed-Form Beurling–Ahlfors Maximal Dilatation Bound `K*(M)` # Strictly Beating Lehtinen's `min(M^{3/2}, 2M - 1)` for Every `M > 1` This standalone Lean 4 module proves our **Universal Closed-Form Beurling–Ahlfors Theorem**: For every `M ≥ 1` and every `M`-quasisymmetric homeomorphism `h : ℝ → ℝ`, choosing the exact optimal Beurling–Ahlfors vertical scaling parameter `r*(M) = (M + 1) √((M² + 1) / (M⁴ + 1))`, the pointwise maximal dilatation `K(DF_{r*(M)}[h](x, y))` satisfies at EVERY `(x, y) ∈ ℍ`: `K(DF_{r*(M)}[h](x, y)) ≤ K*(M) := (√((M² + 1)(M⁴ + 1)) + M³ - 1) / (M(M + 1))`. ## Key Results Proved (Zero `sorry`, Zero Axioms) 1. **Square-Root Cancellation & 5-Vertex Pentagon Convexity Reduction**: Because `r*(M)² = (M + 1)²(M² + 1) / (M⁴ + 1)` and `2 r*(M) Q*(M) = 4(M² + 1) / M` are purely rational in `M`, `baQ ξ a b (r*(M)) ≤ Q*(M)` reduces to a concave quadratic defect on the 5-vertex pentagon `V₁, …, V₅` cut from `[1/(M+1), M/(M+1)]²` by `ξ a + (2M + 1) b ≥ ξ + 1`, where every vertex expands into a polynomial in `u = ξ - 1 ≥ 0`, `v = M - ξ ≥ 0` with **100% strictly positive integer coefficients**. 2. **Exact Discriminant Identity**: `(M² + 1)(M⁴ + 1) - M²(M + 1)² = (M³ - 1)²`. 3. **Strict Global Superiority over Lehtinen (1983/1984) for EVERY `M > 1`**: - `KStar_lt_two_M_sub_one`: `K*(M) < 2 M - 1` for all `M > 1`, - `KStar_lt_M_mul_sqrt_M`: `K*(M) < M * √M` (`= M^{3/2}`) for all `M > 1`, - `KStar_lt_min_lehtinen`: `K*(M) < min (M * √M) (2 M - 1)` for all `M > 1`, - `KStar_lt_asymptotic`: `K*(M) < 2 M - 2 + 5 / (2 (M + 1))` for all `M ≥ 1`. 4. **Exact Concrete Benchmarks**: `K*(2) = (7 + √85) / 6 < 2.7033`, `K*(3) = (13 + √205) / 6 < 4.5530`, `K*(5) < 8.3860`, `K*(10) < 18.2186`. -/ noncomputable section open Real MeasureTheory Set intervalIntegral namespace BeurlingAhlforsExactBound /-! ## 1. `M`-Quasisymmetric Functions on `ℝ` -/ /-- A function `h : ℝ → ℝ` is `M`-quasisymmetric (`M ≥ 1`) if it is continuous, strictly increasing, and satisfies `1 / M ≤ (h(x + t) - h(x)) / (h(x) - h(x - t)) ≤ M` for all `x ∈ ℝ` and `t > 0`, expressed equivalently without division. -/ structure IsQuasisymmetric (M : ℝ) (h : ℝ → ℝ) : Prop where one_le : 1 ≤ M continuous : Continuous h strictMono : StrictMono h right_le : ∀ x t : ℝ, 0 < t → h (x + t) - h x ≤ M * (h x - h (x - t)) left_le : ∀ x t : ℝ, 0 < t → h x - h (x - t) ≤ M * (h (x + t) - h x) lemma IsQuasisymmetric.pos_M {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) : 0 < M := lt_of_lt_of_le zero_lt_one hh.one_le lemma IsQuasisymmetric.monotone {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) : Monotone h := hh.strictMono.monotone lemma IsQuasisymmetric.right_le_nonneg {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x t : ℝ) (ht : 0 ≤ t) : h (x + t) - h x ≤ M * (h x - h (x - t)) := by rcases eq_or_lt_of_le ht with rfl | hpos · simp · exact hh.right_le x t hpos lemma IsQuasisymmetric.left_le_nonneg {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x t : ℝ) (ht : 0 ≤ t) : h x - h (x - t) ≤ M * (h (x + t) - h x) := by rcases eq_or_lt_of_le ht with rfl | hpos · simp · exact hh.left_le x t hpos /-- Affine renormalization of `h` at `(x, y)` (`y > 0`): maps `-1 ↦ -1`, `0 ↦ 0`, `1 ↦ ξ`. -/ def renorm (h : ℝ → ℝ) (x y : ℝ) (t : ℝ) : ℝ := (h (x + t * y) - h x) / (h x - h (x - y)) lemma renorm_zero (h : ℝ → ℝ) (x y : ℝ) : renorm h x y 0 = 0 := by simp [renorm] lemma renorm_neg_one {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : renorm h x y (-1) = -1 := by unfold renorm have hden : 0 < h x - h (x - y) := sub_pos.mpr (hh.strictMono (by linarith)) have hne : h x - h (x - y) ≠ 0 := ne_of_gt hden have h1 : x + (-1 : ℝ) * y = x - y := by ring rw [h1] field_simp [hne] ring /-- Renormalization preserves `M`-quasisymmetry. -/ theorem IsQuasisymmetric.renorm {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : IsQuasisymmetric M (BeurlingAhlforsExactBound.renorm h x y) := by have hden : 0 < h x - h (x - y) := sub_pos.mpr (hh.strictMono (by linarith)) refine ⟨hh.one_le, ?_, ?_, ?_, ?_⟩ · exact ((hh.continuous.comp (continuous_const.add (continuous_id.mul continuous_const))).sub continuous_const).div_const _ · intro s₁ s₂ hs unfold BeurlingAhlforsExactBound.renorm exact div_lt_div_of_pos_right (sub_lt_sub_right (hh.strictMono (by nlinarith)) _) hden · intro u t ht unfold BeurlingAhlforsExactBound.renorm have hty : 0 < t * y := mul_pos ht hy have h1 : x + (u + t) * y = (x + u * y) + t * y := by ring have h2 : x + (u - t) * y = (x + u * y) - t * y := by ring have hstep := hh.right_le (x + u * y) (t * y) hty rw [h1, h2] rw [div_sub_div_same, div_sub_div_same, mul_div_assoc'] exact div_le_div_of_nonneg_right (by linarith) (le_of_lt hden) · intro u t ht unfold BeurlingAhlforsExactBound.renorm have hty : 0 < t * y := mul_pos ht hy have h1 : x + (u + t) * y = (x + u * y) + t * y := by ring have h2 : x + (u - t) * y = (x + u * y) - t * y := by ring have hstep := hh.left_le (x + u * y) (t * y) hty rw [h1, h2] rw [div_sub_div_same, div_sub_div_same, mul_div_assoc'] exact div_le_div_of_nonneg_right (by linarith) (le_of_lt hden) /-! ## 2. The Beurling–Ahlfors Extension & Exact `C¹` Partial Derivatives -/ /-- Real part `u(x, y)` of the Beurling–Ahlfors extension on `ℍ`. -/ def baU (h : ℝ → ℝ) (x y : ℝ) : ℝ := (1 / (2 * y)) * ∫ s in (x - y)..(x + y), h s /-- Unscaled imaginary part `v(x, y)` of the Beurling–Ahlfors extension on `ℍ`. -/ def baV (h : ℝ → ℝ) (x y : ℝ) : ℝ := (1 / (2 * y)) * ((∫ s in x..(x + y), h s) - (∫ s in (x - y)..x, h s)) /-- The Beurling–Ahlfors extension `F_r[h](x, y) = (u(x, y), r · v(x, y))`. -/ def baExt (h : ℝ → ℝ) (r : ℝ) (x y : ℝ) : ℝ × ℝ := (baU h x y, r * baV h x y) /-- Helper: derivative of `t ↦ ∫ s in a(t)..b(t), h s` when `h` is continuous. -/ lemma hasDerivAt_integral_endpoints {h : ℝ → ℝ} (hh : Continuous h) {a b : ℝ → ℝ} {t a' b' : ℝ} (ha : HasDerivAt a a' t) (hb : HasDerivAt b b' t) : HasDerivAt (fun u => ∫ s in (a u)..(b u), h s) (h (b t) * b' - h (a t) * a') t := by have hF : ∀ c : ℝ, HasDerivAt (fun z => ∫ s in (0 : ℝ)..z, h s) (h c) c := fun c => intervalIntegral.integral_hasDerivAt_right (hh.intervalIntegrable (μ := volume) 0 c) (hh.stronglyMeasurableAtFilter volume (nhds c)) hh.continuousAt have hcomp_b : HasDerivAt (fun u => ∫ s in (0 : ℝ)..(b u), h s) (h (b t) * b') t := (hF (b t)).comp t hb have hcomp_a : HasDerivAt (fun u => ∫ s in (0 : ℝ)..(a u), h s) (h (a t) * a') t := (hF (a t)).comp t ha have hsub := hcomp_b.sub hcomp_a refine hsub.congr_of_eventuallyEq (Filter.Eventually.of_forall fun u => ?_) have hadj := intervalIntegral.integral_add_adjacent_intervals (hh.intervalIntegrable (μ := volume) 0 (a u)) (hh.intervalIntegrable (μ := volume) (a u) (b u)) dsimp only [Pi.sub_apply] linarith /-- Exact `x`-derivative of `u(x, y)`: `u_x(x, y) = (h(x + y) - h(x - y)) / (2y)`. -/ theorem hasDerivAt_baU_x {h : ℝ → ℝ} (hh : Continuous h) (x y : ℝ) (_hy : 0 < y) : HasDerivAt (fun z => baU h z y) ((h (x + y) - h (x - y)) / (2 * y)) x := by have h1 : HasDerivAt (fun z => z - y) 1 x := (hasDerivAt_id x).sub_const y have h2 : HasDerivAt (fun z => z + y) 1 x := (hasDerivAt_id x).add_const y have hmul := (hasDerivAt_integral_endpoints hh h1 h2).const_mul (1 / (2 * y)) have hfn : (fun z => baU h z y) = (fun z => (1 / (2 * y)) * ∫ s in (z - y)..(z + y), h s) := rfl rw [hfn] exact hmul.congr_deriv (by ring) /-- Exact `x`-derivative of `v(x, y)`: `v_x(x, y) = (h(x + y) + h(x - y) - 2 h(x)) / (2y)`. -/ theorem hasDerivAt_baV_x {h : ℝ → ℝ} (hh : Continuous h) (x y : ℝ) (_hy : 0 < y) : HasDerivAt (fun z => baV h z y) ((h (x + y) + h (x - y) - 2 * h x) / (2 * y)) x := by have h0 : HasDerivAt (fun z => z) 1 x := hasDerivAt_id x have h1 : HasDerivAt (fun z => z - y) 1 x := (hasDerivAt_id x).sub_const y have h2 : HasDerivAt (fun z => z + y) 1 x := (hasDerivAt_id x).add_const y have hint1 := hasDerivAt_integral_endpoints hh h0 h2 have hint2 := hasDerivAt_integral_endpoints hh h1 h0 have hmul := (hint1.sub hint2).const_mul (1 / (2 * y)) have hfn : (fun z => baV h z y) = (fun z => (1 / (2 * y)) * ((fun u => ∫ s in u..(u + y), h s) - (fun u => ∫ s in (u - y)..u, h s)) z) := by ext z; rfl rw [hfn] exact hmul.congr_deriv (by ring) /-- Exact `y`-derivative of `u(x, y)`: `u_y(x, y) = (h(x + y) + h(x - y)) / (2y) - (1 / (2 y²)) ∫_{x-y}^{x+y} h(s) ds`. -/ theorem hasDerivAt_baU_y {h : ℝ → ℝ} (hh : Continuous h) (x y : ℝ) (hy : 0 < y) : HasDerivAt (fun z => baU h x z) ((h (x + y) + h (x - y)) / (2 * y) - (1 / (2 * y ^ 2)) * ∫ s in (x - y)..(x + y), h s) y := by have h1 : HasDerivAt (fun z => x - z) (-1) y := (hasDerivAt_id y).const_sub x have h2 : HasDerivAt (fun z => x + z) 1 y := (hasDerivAt_id y).const_add x have hint := hasDerivAt_integral_endpoints hh h1 h2 have hy2 : (2 * y) ≠ 0 := by positivity have hinv : HasDerivAt (fun z => 1 / (2 * z)) (-(2 : ℝ) / (2 * y) ^ 2) y := by have h2z : HasDerivAt (fun z => 2 * z) 2 y := by simpa using (hasDerivAt_id y).const_mul 2 exact (h2z.inv hy2).congr_of_eventuallyEq (Filter.Eventually.of_forall fun z => by simp [one_div]) have hprod := hinv.mul hint have hfn : (fun z => baU h x z) = ((fun z => 1 / (2 * z)) * (fun z => ∫ s in (x - z)..(x + z), h s)) := by ext z; rfl rw [hfn] exact hprod.congr_deriv (by field_simp [hy2]; ring) /-- Exact `y`-derivative of `v(x, y)`: `v_y(x, y) = (h(x + y) - h(x - y)) / (2y) - (1 / (2 y²)) (∫_x^{x+y} h - ∫_{x-y}^x h)`. -/ theorem hasDerivAt_baV_y {h : ℝ → ℝ} (hh : Continuous h) (x y : ℝ) (hy : 0 < y) : HasDerivAt (fun z => baV h x z) ((h (x + y) - h (x - y)) / (2 * y) - (1 / (2 * y ^ 2)) * ((∫ s in x..(x + y), h s) - (∫ s in (x - y)..x, h s))) y := by have h0 : HasDerivAt (fun _ : ℝ => x) 0 y := hasDerivAt_const y x have h1 : HasDerivAt (fun z => x - z) (-1) y := (hasDerivAt_id y).const_sub x have h2 : HasDerivAt (fun z => x + z) 1 y := (hasDerivAt_id y).const_add x have hint1 := hasDerivAt_integral_endpoints hh h0 h2 have hint2 := hasDerivAt_integral_endpoints hh h1 h0 have hint := hint1.sub hint2 have hy2 : (2 * y) ≠ 0 := by positivity have hinv : HasDerivAt (fun z => 1 / (2 * z)) (-(2 : ℝ) / (2 * y) ^ 2) y := by have h2z : HasDerivAt (fun z => 2 * z) 2 y := by simpa using (hasDerivAt_id y).const_mul 2 exact (h2z.inv hy2).congr_of_eventuallyEq (Filter.Eventually.of_forall fun z => by simp [one_div]) have hprod := hinv.mul hint have hfn : (fun z => baV h x z) = ((fun z => 1 / (2 * z)) * ((fun z => ∫ s in x..(x + z), h s) - (fun z => ∫ s in (x - z)..x, h s))) := by ext z; rfl rw [hfn] exact hprod.congr_deriv (by dsimp only [Pi.sub_apply]; field_simp [hy2]; ring) /-! ## 3. Local Normalized Invariants `(ξ, a, b)` & Exact Dilatation Geometry -/ /-- Exact local symmetry ratio `ξ(x, y) = (h(x + y) - h(x)) / (h(x) - h(x - y))`. -/ def baXi (h : ℝ → ℝ) (x y : ℝ) : ℝ := (h (x + y) - h x) / (h x - h (x - y)) /-- Exact right integral-deficit parameter `a(x, y) = 1 - (1/y) ∫_x^{x+y} (h(s) - h(x)) ds / (h(x+y) - h(x))`. -/ def baA (h : ℝ → ℝ) (x y : ℝ) : ℝ := 1 - ((1 / y) * ∫ s in x..(x + y), (h s - h x)) / (h (x + y) - h x) /-- Exact left integral-deficit parameter `b(x, y) = 1 - (1/y) ∫_{x-y}^x (h(x) - h(s)) ds / (h(x) - h(x-y))`. -/ def baB (h : ℝ → ℝ) (x y : ℝ) : ℝ := 1 - ((1 / y) * ∫ s in (x - y)..x, (h x - h s)) / (h x - h (x - y)) /-- The exact 4 entries `(u_x, u_y, r v_x, r v_y)` of the Jacobian `DF_r[h](x, y)`. -/ def baUx (h : ℝ → ℝ) (x y : ℝ) : ℝ := (h (x + y) - h (x - y)) / (2 * y) def baUy (h : ℝ → ℝ) (x y : ℝ) : ℝ := (h (x + y) + h (x - y)) / (2 * y) - (1 / (2 * y ^ 2)) * ∫ s in (x - y)..(x + y), h s def baVx (h : ℝ → ℝ) (x y : ℝ) : ℝ := (h (x + y) + h (x - y) - 2 * h x) / (2 * y) def baVy (h : ℝ → ℝ) (x y : ℝ) : ℝ := (h (x + y) - h (x - y)) / (2 * y) - (1 / (2 * y ^ 2)) * ((∫ s in x..(x + y), h s) - (∫ s in (x - y)..x, h s)) /-- Jacobian determinant `det DF_r(x, y) = r (u_x v_y - u_y v_x)`. -/ def baJacDet (h : ℝ → ℝ) (r x y : ℝ) : ℝ := r * (baUx h x y * baVy h x y - baUy h x y * baVx h x y) /-- Squared Frobenius norm `‖DF_r(x, y)‖_F² = u_x² + u_y² + r² (v_x² + v_y²)`. -/ def baJacFrobSq (h : ℝ → ℝ) (r x y : ℝ) : ℝ := baUx h x y ^ 2 + baUy h x y ^ 2 + r ^ 2 * (baVx h x y ^ 2 + baVy h x y ^ 2) /-- Exact maximal dilatation `K(J) = (‖J‖_F² + √(‖J‖_F⁴ - 4 (det J)²)) / (2 det J)` of an orientation-preserving `2 × 2` Jacobian `J` (equivalently `(|f_z| + |f_z̄|) / (|f_z| - |f_z̄|)`). -/ def matDilatation (frobSq det : ℝ) : ℝ := (frobSq + Real.sqrt (frobSq ^ 2 - 4 * det ^ 2)) / (2 * det) /-- Pointwise maximal dilatation `K(DF_r[h](x, y))` of the Beurling–Ahlfors extension. -/ def baDilatation (h : ℝ → ℝ) (r x y : ℝ) : ℝ := matDilatation (baJacFrobSq h r x y) (baJacDet h r x y) /-- Normalized Beurling–Ahlfors dilatation quotient `Q(ξ, a, b, r) = K + 1/K`. -/ def baQ (ξ a b r : ℝ) : ℝ := ((ξ + 1) ^ 2 + (ξ * a - b) ^ 2 + r ^ 2 * ((ξ - 1) ^ 2 + (ξ * a + b) ^ 2)) / (2 * r * ξ * (a + b)) /-- Helper: `baQ` expressed in terms of `A = (ξ+1)² + (ξa-b)²` and `B = (ξ-1)² + (ξa+b)²`. -/ lemma baQ_eq_div (ξ a b r : ℝ) : baQ ξ a b r = ((ξ + 1) ^ 2 + (ξ * a - b) ^ 2 + r ^ 2 * ((ξ - 1) ^ 2 + (ξ * a + b) ^ 2)) / (2 * r * ξ * (a + b)) := rfl /-- Exact symmetry `Q(1/ξ, b, a, r) = Q(ξ, a, b, r)` for `ξ ≠ 0`. -/ theorem baQ_inv_symm {ξ a b r : ℝ} (hξ : ξ ≠ 0) : baQ (1 / ξ) b a r = baQ ξ a b r := by unfold baQ field_simp [hξ] ring /-- Exact formula for `baA` in terms of the renormalized function `g(t) = renorm h x y t`. -/ lemma baA_eq_renorm {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : baA h x y = 1 - (∫ t in (0 : ℝ)..1, renorm h x y t) / baXi h x y := by unfold baA baXi renorm have hAm : 0 < h x - h (x - y) := sub_pos.mpr (hh.strictMono (by linarith)) have hAp : 0 < h (x + y) - h x := sub_pos.mpr (hh.strictMono (by linarith)) have hsub : ∫ t in (0 : ℝ)..1, (h (x + t * y) - h x) = y⁻¹ * ∫ s in x..(x + y), (h s - h x) := by have hcomp := intervalIntegral.integral_comp_mul_right (fun u => h (x + u) - h x) (ne_of_gt hy) (a := (0 : ℝ)) (b := 1) have hcomp2 := intervalIntegral.integral_comp_add_left (fun s => h s - h x) x (a := (0 : ℝ)) (b := y) simp only [zero_mul, one_mul, add_zero, smul_eq_mul] at hcomp hcomp2 rw [hcomp, hcomp2] rw [intervalIntegral.integral_div, hsub] have hAm_ne : h x - h (x - y) ≠ 0 := ne_of_gt hAm have hAp_ne : h (x + y) - h x ≠ 0 := ne_of_gt hAp have hy_ne : y ≠ 0 := ne_of_gt hy field_simp [hAm_ne, hAp_ne, hy_ne] /-- Exact formula for `baB` in terms of the renormalized function `g(t) = renorm h x y t`. -/ lemma baB_eq_renorm {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : baB h x y = 1 - ∫ t in (-1 : ℝ)..0, (-renorm h x y t) := by unfold baB renorm have hAm : 0 < h x - h (x - y) := sub_pos.mpr (hh.strictMono (by linarith)) have hsub : ∫ t in (-1 : ℝ)..0, (h x - h (x + t * y)) = y⁻¹ * ∫ s in (x - y)..x, (h x - h s) := by have hcomp := intervalIntegral.integral_comp_mul_right (fun u => h x - h (x + u)) (ne_of_gt hy) (a := (-1 : ℝ)) (b := 0) have hcomp2 := intervalIntegral.integral_comp_add_left (fun s => h x - h s) x (a := (-y)) (b := 0) simp only [zero_mul, neg_mul, one_mul, add_zero, smul_eq_mul] at hcomp hcomp2 have hxy : x + -y = x - y := by ring rw [hxy] at hcomp2 rw [hcomp, hcomp2] have hneg : ∫ t in (-1 : ℝ)..0, -((h (x + t * y) - h x) / (h x - h (x - y))) = (∫ t in (-1 : ℝ)..0, (h x - h (x + t * y))) / (h x - h (x - y)) := by rw [← intervalIntegral.integral_div] congr 1; ext t; ring rw [hneg, hsub] have hAm_ne : h x - h (x - y) ≠ 0 := ne_of_gt hAm have hy_ne : y ≠ 0 := ne_of_gt hy field_simp [hAm_ne, hy_ne] /-- Exact expression of the 4 partial derivatives `(baUx, baUy, baVx, baVy)` in terms of `A₋ = h(x) - h(x - y)`, `ξ = baXi`, `a = baA`, `b = baB`. -/ lemma baPartials_eq {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : let Am := h x - h (x - y) let ξ := baXi h x y let a := baA h x y let b := baB h x y baUx h x y = (Am / (2 * y)) * (ξ + 1) ∧ baVx h x y = (Am / (2 * y)) * (ξ - 1) ∧ baUy h x y = (Am / (2 * y)) * (ξ * a - b) ∧ baVy h x y = (Am / (2 * y)) * (ξ * a + b) := by intro Am ξ a b have hAm : 0 < h x - h (x - y) := sub_pos.mpr (hh.strictMono (by linarith)) have hAp : 0 < h (x + y) - h x := sub_pos.mpr (hh.strictMono (by linarith)) have hAm_ne : h x - h (x - y) ≠ 0 := ne_of_gt hAm have hAp_ne : h (x + y) - h x ≠ 0 := ne_of_gt hAp have hy_ne : y ≠ 0 := ne_of_gt hy have hξ_mul : Am * ξ = h (x + y) - h x := by dsimp only [Am, ξ, baXi]; field_simp [hAm_ne] have hIntR : ∫ s in x..(x + y), (h s - h x) = (∫ s in x..(x + y), h s) - y * h x := by rw [intervalIntegral.integral_sub (hh.continuous.intervalIntegrable _ _) (continuous_const.intervalIntegrable _ _)] simp only [intervalIntegral.integral_const, smul_eq_mul] ring have hIntL : ∫ s in (x - y)..x, (h x - h s) = y * h x - ∫ s in (x - y)..x, h s := by rw [intervalIntegral.integral_sub (continuous_const.intervalIntegrable _ _) (hh.continuous.intervalIntegrable _ _)] simp only [intervalIntegral.integral_const, smul_eq_mul] ring have hIntTot : ∫ s in (x - y)..(x + y), h s = (∫ s in (x - y)..x, h s) + (∫ s in x..(x + y), h s) := (intervalIntegral.integral_add_adjacent_intervals (hh.continuous.intervalIntegrable _ _) (hh.continuous.intervalIntegrable _ _)).symm have hξa : Am * (ξ * a) = (h (x + y) - h x) - (1 / y) * ((∫ s in x..(x + y), h s) - y * h x) := by have : Am * (ξ * a) = (Am * ξ) * a := by ring rw [this, hξ_mul] dsimp only [a, baA] rw [hIntR] field_simp [hAp_ne, hy_ne] have hb_mul : Am * b = (h x - h (x - y)) - (1 / y) * (y * h x - ∫ s in (x - y)..x, h s) := by dsimp only [Am, b, baB] rw [hIntL] field_simp [hAm_ne, hy_ne] refine ⟨?_, ?_, ?_, ?_⟩ · unfold baUx have : Am * (ξ + 1) = h (x + y) - h (x - y) := by have : Am * (ξ + 1) = Am * ξ + Am := by ring rw [this, hξ_mul]; dsimp only [Am]; ring rw [div_mul_eq_mul_div, this] · unfold baVx have : Am * (ξ - 1) = h (x + y) + h (x - y) - 2 * h x := by have : Am * (ξ - 1) = Am * ξ - Am := by ring rw [this, hξ_mul]; dsimp only [Am]; ring rw [div_mul_eq_mul_div, this] · unfold baUy rw [hIntTot] have hdiff : Am * (ξ * a - b) = Am * (ξ * a) - Am * b := by ring symm rw [div_mul_eq_mul_div, hdiff, hξa, hb_mul] field_simp [hy_ne] ring · unfold baVy have hsum : Am * (ξ * a + b) = Am * (ξ * a) + Am * b := by ring symm rw [div_mul_eq_mul_div, hsum, hξa, hb_mul] field_simp [hy_ne] ring /-- Exact Jacobian determinant identity in terms of `(ξ, a, b)`. -/ theorem baJacDet_eq {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (r x y : ℝ) (hy : 0 < y) : baJacDet h r x y = ((h x - h (x - y)) / (2 * y)) ^ 2 * (2 * r * baXi h x y * (baA h x y + baB h x y)) := by rcases baPartials_eq hh x y hy with ⟨hux, hvx, huy, hvy⟩ unfold baJacDet rw [hux, hvx, huy, hvy] ring /-- Exact Frobenius norm squared identity in terms of `(ξ, a, b)`. -/ theorem baJacFrobSq_eq {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (r x y : ℝ) (hy : 0 < y) : baJacFrobSq h r x y = ((h x - h (x - y)) / (2 * y)) ^ 2 * ((baXi h x y + 1) ^ 2 + (baXi h x y * baA h x y - baB h x y) ^ 2 + r ^ 2 * ((baXi h x y - 1) ^ 2 + (baXi h x y * baA h x y + baB h x y) ^ 2)) := by rcases baPartials_eq hh x y hy with ⟨hux, hvx, huy, hvy⟩ unfold baJacFrobSq rw [hux, hvx, huy, hvy] ring /-- Exact algebraic inequality `2 det ≤ ‖J‖_F²` for any real `2 × 2` matrix. -/ lemma two_mul_det_le_frobSq (ux uy vx vy r : ℝ) : 2 * (r * (ux * vy - uy * vx)) ≤ ux ^ 2 + uy ^ 2 + r ^ 2 * (vx ^ 2 + vy ^ 2) := by have h : 0 ≤ (ux - r * vy) ^ 2 + (uy + r * vx) ^ 2 := by positivity nlinarith /-- For any positive `det` and `frobSq ≥ 2 det`, `K = matDilatation frobSq det` satisfies `1 ≤ K` and `K + K⁻¹ = frobSq / det`. -/ lemma matDilatation_ge_one {frobSq det : ℝ} (hdet : 0 < det) (hge : 2 * det ≤ frobSq) : 1 ≤ matDilatation frobSq det := by unfold matDilatation have hsq : 0 ≤ Real.sqrt (frobSq ^ 2 - 4 * det ^ 2) := Real.sqrt_nonneg _ rw [one_le_div (by positivity)] linarith lemma matDilatation_add_inv {frobSq det : ℝ} (hdet : 0 < det) (hge : 2 * det ≤ frobSq) : matDilatation frobSq det + (matDilatation frobSq det)⁻¹ = frobSq / det := by have hK1 : 1 ≤ matDilatation frobSq det := matDilatation_ge_one hdet hge have hKpos : 0 < matDilatation frobSq det := by linarith have hdisc : 0 ≤ frobSq ^ 2 - 4 * det ^ 2 := by nlinarith set s := Real.sqrt (frobSq ^ 2 - 4 * det ^ 2) have hs2 : s ^ 2 = frobSq ^ 2 - 4 * det ^ 2 := Real.sq_sqrt hdisc have hmul : (frobSq + s) * (frobSq - s) = 4 * det ^ 2 := by nlinarith have hK : matDilatation frobSq det = (frobSq + s) / (2 * det) := rfl have hfp : frobSq + s ≠ 0 := by have : 0 < frobSq + s := by linarith [Real.sqrt_nonneg (frobSq ^ 2 - 4 * det ^ 2)] exact ne_of_gt this have hdet_ne : det ≠ 0 := ne_of_gt hdet rw [hK] field_simp [hfp, hdet_ne] nlinarith /-- Monotonicity bridge: if `K ≥ 1` and `K + K⁻¹ ≤ Q` (with `2 ≤ Q`), then `K ≤ (Q + √(Q² - 4)) / 2`. -/ lemma le_of_add_inv_le {K Q : ℝ} (hK : 1 ≤ K) (hQ : K + K⁻¹ ≤ Q) : K ≤ (Q + Real.sqrt (Q ^ 2 - 4)) / 2 := by have hKpos : 0 < K := by linarith have hQ2 : 2 ≤ Q := by have : 0 ≤ (K - 1) ^ 2 / K := by positivity have h2 : 2 ≤ K + K⁻¹ := by have : K + K⁻¹ - 2 = (K - 1) ^ 2 / K := by field_simp [ne_of_gt hKpos]; ring linarith linarith have hdisc : 0 ≤ Q ^ 2 - 4 := by nlinarith have hquad : (2 * K - Q) ^ 2 ≤ Q ^ 2 - 4 := by have h1 : K ^ 2 + 1 ≤ Q * K := by have := mul_le_mul_of_nonneg_right hQ (le_of_lt hKpos) rw [add_mul, inv_mul_cancel₀ (ne_of_gt hKpos)] at this nlinarith nlinarith have hsqrt : 2 * K - Q ≤ Real.sqrt (Q ^ 2 - 4) := by by_cases hsign : 2 * K - Q ≤ 0 · linarith [Real.sqrt_nonneg (Q ^ 2 - 4)] · push Not at hsign have := Real.sqrt_le_sqrt hquad rwa [Real.sqrt_sq (le_of_lt hsign)] at this linarith /-! ## 4. Integral Inequalities for `M`-Quasisymmetric Functions -/ /-- Exact symmetry ratio bounds `1 / M ≤ ξ ≤ M`. -/ theorem qs_xi_bounds {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : 1 / M ≤ baXi h x y ∧ baXi h x y ≤ M := by unfold baXi have hAm : 0 < h x - h (x - y) := sub_pos.mpr (hh.strictMono (by linarith)) have hM : 0 < M := hh.pos_M have hr := hh.right_le x y hy have hl := hh.left_le x y hy constructor · rw [div_le_div_iff₀ hM hAm]; linarith · rw [div_le_iff₀ hAm]; exact hr /-- **Core Unit-Interval Integral Bound (Beurling–Ahlfors 1956)**: For any `M`-quasisymmetric function `g : ℝ → ℝ` with `g 0 = 0` and `g 1 = c > 0`, `c / (M + 1) ≤ ∫ t in 0..1, g t ≤ M * c / (M + 1)`. -/ theorem qs_unit_integral_bounds {M : ℝ} {g : ℝ → ℝ} (hg : IsQuasisymmetric M g) (hg0 : g 0 = 0) : g 1 / (M + 1) ≤ (∫ t in (0 : ℝ)..1, g t) ∧ (∫ t in (0 : ℝ)..1, g t) ≤ M * g 1 / (M + 1) := by have hM : 0 < M := hg.pos_M have hM1 : 0 < M + 1 := by linarith set I := ∫ t in (0 : ℝ)..1, g t set I₁ := ∫ t in (0 : ℝ)..(1 / 2 : ℝ), g t set I₂ := ∫ t in (1 / 2 : ℝ)..1, g t have hI_split : I = I₁ + I₂ := (intervalIntegral.integral_add_adjacent_intervals (hg.continuous.intervalIntegrable _ _) (hg.continuous.intervalIntegrable _ _)).symm -- Change of variables: ∫_0^{1/2} g(2t) dt = I / 2 have hscale : ∫ t in (0 : ℝ)..(1 / 2 : ℝ), g (2 * t) = I / 2 := by have hc := intervalIntegral.integral_comp_mul_left g (by norm_num : (2 : ℝ) ≠ 0) (a := (0 : ℝ)) (b := (1 / 2 : ℝ)) simp only [mul_zero, smul_eq_mul] at hc have h2 : (2 : ℝ) * (1 / 2 : ℝ) = 1 := by norm_num rw [h2] at hc linarith -- Change of variables: ∫_0^{1/2} g(1 - t) dt = I₂ have hrefl1 : ∫ t in (0 : ℝ)..(1 / 2 : ℝ), g (1 - t) = I₂ := by rw [intervalIntegral.integral_comp_sub_left g (1 : ℝ)] have h1 : (1 : ℝ) - 1 / 2 = 1 / 2 := by norm_num have h2 : (1 : ℝ) - 0 = 1 := by norm_num rw [h1, h2] -- Change of variables: ∫_0^{1/2} g(1 - 2t) dt = I / 2 have hrefl2 : ∫ t in (0 : ℝ)..(1 / 2 : ℝ), g (1 - 2 * t) = I / 2 := by have hc1 := intervalIntegral.integral_comp_mul_left (fun u => g (1 - u)) (by norm_num : (2 : ℝ) ≠ 0) (a := (0 : ℝ)) (b := (1 / 2 : ℝ)) simp only [mul_zero, smul_eq_mul] at hc1 have h2 : (2 : ℝ) * (1 / 2 : ℝ) = 1 := by norm_num rw [h2, intervalIntegral.integral_comp_sub_left g (1 : ℝ)] at hc1 have h3 : (1 : ℝ) - 1 = 0 := by norm_num have h4 : (1 : ℝ) - 0 = 1 := by norm_num rw [h3, h4] at hc1 linarith -- Integrability helpers have hint_g : IntervalIntegrable g volume 0 (1 / 2 : ℝ) := hg.continuous.intervalIntegrable _ _ have hint_g2 : IntervalIntegrable (fun t => g (2 * t)) volume 0 (1 / 2 : ℝ) := (hg.continuous.comp (continuous_const.mul continuous_id)).intervalIntegrable _ _ have hint_r1 : IntervalIntegrable (fun t => g (1 - t)) volume 0 (1 / 2 : ℝ) := (hg.continuous.comp (continuous_const.sub continuous_id)).intervalIntegrable _ _ have hint_r2 : IntervalIntegrable (fun t => g (1 - 2 * t)) volume 0 (1 / 2 : ℝ) := (hg.continuous.comp (continuous_const.sub (continuous_const.mul continuous_id))).intervalIntegrable _ _ -- (A) From triple (0, t, 2t) for t ∈ [0, 1/2]: -- g(2t) - g(t) ≤ M * g(t) and g(t) ≤ M * (g(2t) - g(t)) have hA1 : I / 2 - I₁ ≤ M * I₁ := by have hpt : ∀ t ∈ uIcc (0 : ℝ) (1 / 2 : ℝ), g (2 * t) - g t ≤ M * g t := by intro t ht rw [uIcc_of_le (by norm_num : (0 : ℝ) ≤ 1 / 2)] at ht have h := hg.right_le_nonneg t t ht.1 have h1 : t + t = 2 * t := by ring have h2 : t - t = 0 := by ring rw [h1, h2, hg0, sub_zero] at h exact h have hint := intervalIntegral.integral_mono_on (by norm_num : (0 : ℝ) ≤ 1 / 2) (hint_g2.sub hint_g) (hint_g.const_mul M) (fun t ht => hpt t (by rwa [uIcc_of_le (by norm_num)])) rw [intervalIntegral.integral_sub hint_g2 hint_g, intervalIntegral.integral_const_mul, hscale] at hint exact hint have hA2 : I₁ ≤ M * (I / 2 - I₁) := by have hpt : ∀ t ∈ uIcc (0 : ℝ) (1 / 2 : ℝ), g t ≤ M * (g (2 * t) - g t) := by intro t ht rw [uIcc_of_le (by norm_num : (0 : ℝ) ≤ 1 / 2)] at ht have h := hg.left_le_nonneg t t ht.1 have h1 : t + t = 2 * t := by ring have h2 : t - t = 0 := by ring rw [h1, h2, hg0, sub_zero] at h exact h have hint := intervalIntegral.integral_mono_on (by norm_num : (0 : ℝ) ≤ 1 / 2) hint_g ((hint_g2.sub hint_g).const_mul M) (fun t ht => hpt t (by rwa [uIcc_of_le (by norm_num)])) rw [intervalIntegral.integral_const_mul, intervalIntegral.integral_sub hint_g2 hint_g, hscale] at hint exact hint -- (B) From triple (1 - 2t, 1 - t, 1) for t ∈ [0, 1/2]: -- g(1) - g(1 - t) ≤ M * (g(1 - t) - g(1 - 2t)) and reverse have hB1 : g 1 / 2 - I₂ ≤ M * (I₂ - I / 2) := by have hpt : ∀ t ∈ Icc (0 : ℝ) (1 / 2 : ℝ), g 1 - g (1 - t) ≤ M * (g (1 - t) - g (1 - 2 * t)) := by intro t ht have h := hg.right_le_nonneg (1 - t) t ht.1 have h1 : (1 - t) + t = 1 := by ring have h2 : (1 - t) - t = 1 - 2 * t := by ring rw [h1, h2] at h exact h have hint := intervalIntegral.integral_mono_on (by norm_num : (0 : ℝ) ≤ 1 / 2) ((continuous_const.intervalIntegrable _ _).sub hint_r1) ((hint_r1.sub hint_r2).const_mul M) hpt rw [intervalIntegral.integral_sub (continuous_const.intervalIntegrable _ _) hint_r1, intervalIntegral.integral_const_mul, intervalIntegral.integral_sub hint_r1 hint_r2, intervalIntegral.integral_const, hrefl1, hrefl2] at hint simp only [sub_zero, smul_eq_mul] at hint linarith have hB2 : I₂ - I / 2 ≤ M * (g 1 / 2 - I₂) := by have hpt : ∀ t ∈ Icc (0 : ℝ) (1 / 2 : ℝ), g (1 - t) - g (1 - 2 * t) ≤ M * (g 1 - g (1 - t)) := by intro t ht have h := hg.left_le_nonneg (1 - t) t ht.1 have h1 : (1 - t) + t = 1 := by ring have h2 : (1 - t) - t = 1 - 2 * t := by ring rw [h1, h2] at h exact h have hint := intervalIntegral.integral_mono_on (by norm_num : (0 : ℝ) ≤ 1 / 2) (hint_r1.sub hint_r2) (((continuous_const.intervalIntegrable _ _).sub hint_r1).const_mul M) hpt rw [intervalIntegral.integral_sub hint_r1 hint_r2, intervalIntegral.integral_const_mul, intervalIntegral.integral_sub (continuous_const.intervalIntegrable _ _) hint_r1, intervalIntegral.integral_const, hrefl1, hrefl2] at hint simp only [sub_zero, smul_eq_mul] at hint linarith -- Combine hA1, hB2 for lower bound and hA2, hB1 for upper bound: constructor · rw [div_le_iff₀ hM1] nlinarith · rw [le_div_iff₀ hM1] nlinarith /-- Classical box bounds `1 / (M + 1) ≤ a ≤ M / (M + 1)` for `baA`. -/ theorem qs_a_bounds {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : 1 / (M + 1) ≤ baA h x y ∧ baA h x y ≤ M / (M + 1) := by have hg := hh.renorm x y hy have hg0 : renorm h x y 0 = 0 := renorm_zero h x y have hξ_eq : renorm h x y 1 = baXi h x y := by simp [renorm, baXi] have hξ_pos : 0 < baXi h x y := by unfold baXi exact div_pos (sub_pos.mpr (hh.strictMono (by linarith))) (sub_pos.mpr (hh.strictMono (by linarith))) have hM1 : 0 < M + 1 := by linarith [hh.one_le] rcases qs_unit_integral_bounds hg hg0 with ⟨hlo, hhi⟩ rw [hξ_eq] at hlo hhi rw [baA_eq_renorm hh x y hy] constructor · have h1 : (∫ t in (0 : ℝ)..1, renorm h x y t) / baXi h x y ≤ M / (M + 1) := by rw [div_le_iff₀ hξ_pos] calc ∫ t in (0 : ℝ)..1, renorm h x y t ≤ M * baXi h x y / (M + 1) := hhi _ = M / (M + 1) * baXi h x y := by ring have : 1 - M / (M + 1) = 1 / (M + 1) := by field_simp [ne_of_gt hM1]; ring linarith · have h1 : 1 / (M + 1) ≤ (∫ t in (0 : ℝ)..1, renorm h x y t) / baXi h x y := by rw [le_div_iff₀ hξ_pos] calc 1 / (M + 1) * baXi h x y = baXi h x y / (M + 1) := by ring _ ≤ ∫ t in (0 : ℝ)..1, renorm h x y t := hlo have : 1 - 1 / (M + 1) = M / (M + 1) := by field_simp [ne_of_gt hM1]; ring linarith /-- Mirror of `h`: `t ↦ -g(-t)` is also `M`-quasisymmetric. -/ lemma IsQuasisymmetric.neg_comp_neg {M : ℝ} {g : ℝ → ℝ} (hg : IsQuasisymmetric M g) : IsQuasisymmetric M (fun t => -g (-t)) := by refine ⟨hg.one_le, ?_, ?_, ?_, ?_⟩ · exact (hg.continuous.comp continuous_neg).neg · intro s₁ s₂ hs exact neg_lt_neg (hg.strictMono (neg_lt_neg hs)) · intro u t ht have h := hg.left_le (-u) t ht have h1 : -(u + t) = -u - t := by ring have h2 : -(u - t) = -u + t := by ring rw [h1, h2] linarith · intro u t ht have h := hg.right_le (-u) t ht have h1 : -(u + t) = -u - t := by ring have h2 : -(u - t) = -u + t := by ring rw [h1, h2] linarith /-- Classical box bounds `1 / (M + 1) ≤ b ≤ M / (M + 1)` for `baB`. -/ theorem qs_b_bounds {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : 1 / (M + 1) ≤ baB h x y ∧ baB h x y ≤ M / (M + 1) := by have hg := (hh.renorm x y hy).neg_comp_neg have hg0 : -renorm h x y (-0) = 0 := by simp [renorm_zero] have hg1 : -renorm h x y (-1) = 1 := by rw [renorm_neg_one hh x y hy]; ring have hM1 : 0 < M + 1 := by linarith [hh.one_le] rcases qs_unit_integral_bounds hg hg0 with ⟨hlo, hhi⟩ rw [hg1] at hlo hhi have hrefl : ∫ t in (0 : ℝ)..1, (-renorm h x y (-t)) = ∫ t in (-1 : ℝ)..0, (-renorm h x y t) := by rw [intervalIntegral.integral_comp_neg (fun u => -renorm h x y u)] simp rw [hrefl] at hlo hhi rw [baB_eq_renorm hh x y hy] constructor · have : 1 - M * 1 / (M + 1) = 1 / (M + 1) := by field_simp [ne_of_gt hM1]; ring linarith · have : 1 - 1 / (M + 1) = M / (M + 1) := by field_simp [ne_of_gt hM1]; ring linarith /-- **Strict Jacobian Positivity**: for every `M`-quasisymmetric `h` and `r > 0`, `det DF_r[h](x, y) > 0` everywhere on `ℍ`. -/ theorem baJacDet_pos {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) {r x y : ℝ} (hr : 0 < r) (hy : 0 < y) : 0 < baJacDet h r x y := by rw [baJacDet_eq hh r x y hy] have hAm : 0 < h x - h (x - y) := sub_pos.mpr (hh.strictMono (by linarith)) have hM := hh.pos_M have hM1 : 0 < M + 1 := by linarith [hh.one_le] have hξ : 0 < baXi h x y := lt_of_lt_of_le (by positivity) (qs_xi_bounds hh x y hy).1 have ha : 0 < baA h x y := lt_of_lt_of_le (by positivity) (qs_a_bounds hh x y hy).1 have hb : 0 < baB h x y := lt_of_lt_of_le (by positivity) (qs_b_bounds hh x y hy).1 positivity /-- **Exact Pointwise Dilatation Identity**: `K(DF_r[h](x, y)) + K(DF_r[h](x, y))⁻¹ = baQ (baXi h x y) (baA h x y) (baB h x y) r`. -/ theorem baDilatation_add_inv_eq {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) {r x y : ℝ} (hr : 0 < r) (hy : 0 < y) : baDilatation h r x y + (baDilatation h r x y)⁻¹ = baQ (baXi h x y) (baA h x y) (baB h x y) r := by have hdet : 0 < baJacDet h r x y := baJacDet_pos hh hr hy have hge : 2 * baJacDet h r x y ≤ baJacFrobSq h r x y := two_mul_det_le_frobSq (baUx h x y) (baUy h x y) (baVx h x y) (baVy h x y) r unfold baDilatation rw [matDilatation_add_inv hdet hge, baJacFrobSq_eq hh r x y hy, baJacDet_eq hh r x y hy] have hAm : 0 < h x - h (x - y) := sub_pos.mpr (hh.strictMono (by linarith)) have hscale : ((h x - h (x - y)) / (2 * y)) ^ 2 ≠ 0 := by positivity unfold baQ exact mul_div_mul_left _ _ hscale theorem baDilatation_ge_one {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) {r x y : ℝ} (hr : 0 < r) (hy : 0 < y) : 1 ≤ baDilatation h r x y := matDilatation_ge_one (baJacDet_pos hh hr hy) (two_mul_det_le_frobSq (baUx h x y) (baUy h x y) (baVx h x y) (baVy h x y) r) /-- **Coupled Integral Inequality (Right)**: integrating the `M`-quasisymmetric triple `(-1, -t, 1 - 2t)` over `t ∈ [0, 1]` gives `ξ · a + (2M + 1) · b ≥ ξ + 1`. -/ theorem qs_coupled_ineq_right {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : baXi h x y + 1 ≤ baXi h x y * baA h x y + (2 * M + 1) * baB h x y := by set g := renorm h x y have hg : IsQuasisymmetric M g := hh.renorm x y hy have hg1 : g 1 = baXi h x y := by simp [g, renorm, baXi] have hgm1 : g (-1) = -1 := renorm_neg_one hh x y hy have hξ_pos : 0 < baXi h x y := lt_of_lt_of_le (by positivity [hh.pos_M]) (qs_xi_bounds hh x y hy).1 set Ip := ∫ t in (0 : ℝ)..1, g t set Im := ∫ t in (-1 : ℝ)..0, (-g t) have hIp_eq : Ip = baXi h x y * (1 - baA h x y) := by rw [baA_eq_renorm hh x y hy] field_simp [ne_of_gt hξ_pos] ring have hIm_eq : Im = 1 - baB h x y := by rw [baB_eq_renorm hh x y hy] ring -- Change of variables: ∫_0^1 g(1 - 2t) dt = (Ip - Im) / 2 have hcomp1 : ∫ t in (0 : ℝ)..1, g (1 - 2 * t) = (Ip - Im) / 2 := by have hc1 := intervalIntegral.integral_comp_mul_left (fun u => g (1 - u)) (by norm_num : (2 : ℝ) ≠ 0) (a := (0 : ℝ)) (b := 1) simp only [mul_zero, mul_one, smul_eq_mul] at hc1 rw [intervalIntegral.integral_comp_sub_left g (1 : ℝ)] at hc1 have h1 : (1 : ℝ) - 2 = -1 := by norm_num have h2 : (1 : ℝ) - 0 = 1 := by norm_num rw [h1, h2] at hc1 have hadj : (∫ u in (-1 : ℝ)..1, g u) = (∫ u in (-1 : ℝ)..0, g u) + (∫ u in (0 : ℝ)..1, g u) := (intervalIntegral.integral_add_adjacent_intervals (hg.continuous.intervalIntegrable _ _) (hg.continuous.intervalIntegrable _ _)).symm have hneg : (∫ u in (-1 : ℝ)..0, g u) = -Im := by simp only [Im, intervalIntegral.integral_neg, neg_neg] linarith -- Change of variables: ∫_0^1 g(-t) dt = -Im have hcomp2 : ∫ t in (0 : ℝ)..1, g (-t) = -Im := by have hc := intervalIntegral.integral_comp_neg g (a := (0 : ℝ)) (b := 1) simp only [neg_zero] at hc rw [hc] simp only [Im, intervalIntegral.integral_neg, neg_neg] -- Pointwise M-QS on (-1, -t, 1 - 2t) for t ∈ [0, 1] (step 1 - t ≥ 0): -- g(1 - 2t) - g(-t) ≤ M * (g(-t) - g(-1)) = M * (g(-t) + 1) have hpt : ∀ t ∈ Icc (0 : ℝ) 1, g (1 - 2 * t) - g (-t) ≤ M * (g (-t) + 1) := by intro t ht have h := hg.right_le_nonneg (-t) (1 - t) (by linarith [ht.2]) have h1 : -t + (1 - t) = 1 - 2 * t := by ring have h2 : -t - (1 - t) = -1 := by ring rw [h1, h2, hgm1] at h linarith have hint1 : IntervalIntegrable (fun t => g (1 - 2 * t)) volume 0 1 := (hg.continuous.comp (continuous_const.sub (continuous_const.mul continuous_id))).intervalIntegrable _ _ have hint2 : IntervalIntegrable (fun t => g (-t)) volume 0 1 := (hg.continuous.comp continuous_neg).intervalIntegrable _ _ have hint := intervalIntegral.integral_mono_on (by norm_num : (0 : ℝ) ≤ 1) (hint1.sub hint2) ((hint2.add (continuous_const.intervalIntegrable _ _)).const_mul M) hpt rw [intervalIntegral.integral_sub hint1 hint2, intervalIntegral.integral_const_mul, intervalIntegral.integral_add hint2 (continuous_const.intervalIntegrable _ _), intervalIntegral.integral_const, hcomp1, hcomp2] at hint simp only [sub_zero, smul_eq_mul, mul_one] at hint rw [hIp_eq, hIm_eq] at hint linarith /-- **Coupled Integral Inequality (Left)**: integrating the `M`-quasisymmetric triple `(2t - 1, t, 1)` over `t ∈ [0, 1]` gives `(2M + 1) · ξ · a + b ≥ ξ + 1`. -/ theorem qs_coupled_ineq_left {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : baXi h x y + 1 ≤ (2 * M + 1) * baXi h x y * baA h x y + baB h x y := by set g := renorm h x y have hg : IsQuasisymmetric M g := hh.renorm x y hy have hg1 : g 1 = baXi h x y := by simp [g, renorm, baXi] have hξ_pos : 0 < baXi h x y := lt_of_lt_of_le (by positivity [hh.pos_M]) (qs_xi_bounds hh x y hy).1 set Ip := ∫ t in (0 : ℝ)..1, g t set Im := ∫ t in (-1 : ℝ)..0, (-g t) have hIp_eq : Ip = baXi h x y * (1 - baA h x y) := by rw [baA_eq_renorm hh x y hy] field_simp [ne_of_gt hξ_pos] ring have hIm_eq : Im = 1 - baB h x y := by rw [baB_eq_renorm hh x y hy] ring -- Change of variables: ∫_0^1 g(2t - 1) dt = (Ip - Im) / 2 have hcomp1 : ∫ t in (0 : ℝ)..1, g (2 * t - 1) = (Ip - Im) / 2 := by have hc1 := intervalIntegral.integral_comp_mul_left (fun u => g (u - 1)) (by norm_num : (2 : ℝ) ≠ 0) (a := (0 : ℝ)) (b := 1) simp only [mul_zero, mul_one, smul_eq_mul] at hc1 rw [intervalIntegral.integral_comp_sub_right g (1 : ℝ)] at hc1 have h1 : (0 : ℝ) - 1 = -1 := by norm_num have h2 : (2 : ℝ) - 1 = 1 := by norm_num rw [h1, h2] at hc1 have hadj : (∫ u in (-1 : ℝ)..1, g u) = (∫ u in (-1 : ℝ)..0, g u) + (∫ u in (0 : ℝ)..1, g u) := (intervalIntegral.integral_add_adjacent_intervals (hg.continuous.intervalIntegrable _ _) (hg.continuous.intervalIntegrable _ _)).symm have hneg : (∫ u in (-1 : ℝ)..0, g u) = -Im := by simp only [Im, intervalIntegral.integral_neg, neg_neg] linarith -- Pointwise M-QS on (2t - 1, t, 1) for t ∈ [0, 1] (step 1 - t ≥ 0): -- g(t) - g(2t - 1) ≤ M * (g(1) - g(t)) have hpt : ∀ t ∈ Icc (0 : ℝ) 1, g t - g (2 * t - 1) ≤ M * (baXi h x y - g t) := by intro t ht have h := hg.left_le_nonneg t (1 - t) (by linarith [ht.2]) have h1 : t + (1 - t) = 1 := by ring have h2 : t - (1 - t) = 2 * t - 1 := by ring rw [h1, h2, hg1] at h exact h have hint1 : IntervalIntegrable g volume 0 1 := hg.continuous.intervalIntegrable _ _ have hint2 : IntervalIntegrable (fun t => g (2 * t - 1)) volume 0 1 := (hg.continuous.comp ((continuous_const.mul continuous_id).sub continuous_const)).intervalIntegrable _ _ have hint := intervalIntegral.integral_mono_on (by norm_num : (0 : ℝ) ≤ 1) (hint1.sub hint2) (((continuous_const.intervalIntegrable _ _).sub hint1).const_mul M) hpt rw [intervalIntegral.integral_sub hint1 hint2, intervalIntegral.integral_const_mul, intervalIntegral.integral_sub (continuous_const.intervalIntegrable _ _) hint1, intervalIntegral.integral_const, hcomp1] at hint simp only [sub_zero, smul_eq_mul, one_mul] at hint have hIp' : (∫ t in (0 : ℝ)..1, g t) = Ip := rfl rw [hIp', hIp_eq, hIm_eq] at hint linarith /-! ## 5. Optimal Parameter `r*(M)`, Closed-Form `Q*(M)` and `K*(M)` -/ /-- Exact optimal Beurling–Ahlfors vertical scaling parameter `r*(M) = (M + 1) √((M² + 1) / (M⁴ + 1))`. -/ def rStar (M : ℝ) : ℝ := (M + 1) * Real.sqrt ((M ^ 2 + 1) / (M ^ 4 + 1)) /-- Exact dilatation quotient `Q*(M) = 2 √((M² + 1)(M⁴ + 1)) / (M(M + 1))`. -/ def QStar (M : ℝ) : ℝ := 2 * Real.sqrt ((M ^ 2 + 1) * (M ^ 4 + 1)) / (M * (M + 1)) /-- Exact closed-form Beurling–Ahlfors maximal dilatation upper bound `K*(M) = (√((M² + 1)(M⁴ + 1)) + M³ - 1) / (M(M + 1))`. -/ def KStar (M : ℝ) : ℝ := (Real.sqrt ((M ^ 2 + 1) * (M ^ 4 + 1)) + M ^ 3 - 1) / (M * (M + 1)) lemma rStar_pos {M : ℝ} (hM : 1 ≤ M) : 0 < rStar M := by unfold rStar have h1 : 0 < M + 1 := by linarith have h2 : 0 < (M ^ 2 + 1) / (M ^ 4 + 1) := by positivity exact mul_pos h1 (Real.sqrt_pos.mpr h2) lemma rStar_sq {M : ℝ} (_hM : 1 ≤ M) : rStar M ^ 2 = (M + 1) ^ 2 * (M ^ 2 + 1) / (M ^ 4 + 1) := by unfold rStar rw [mul_pow, Real.sq_sqrt (by positivity)] ring /-- **Square-Root Cancellation Identity**: `2 * r*(M) * Q*(M) = 4 * (M² + 1) / M`. -/ lemma two_mul_rStar_mul_QStar {M : ℝ} (hM : 1 ≤ M) : 2 * rStar M * QStar M = 4 * (M ^ 2 + 1) / M := by unfold rStar QStar have hM0 : M ≠ 0 := by linarith have hM1 : M + 1 ≠ 0 := by linarith have hM2 : (0 : ℝ) ≤ M ^ 2 + 1 := by positivity have hM4 : (0 : ℝ) < M ^ 4 + 1 := by positivity have hsq : Real.sqrt ((M ^ 2 + 1) / (M ^ 4 + 1)) * Real.sqrt ((M ^ 2 + 1) * (M ^ 4 + 1)) = M ^ 2 + 1 := by rw [← Real.sqrt_mul (by positivity)] have hmul : (M ^ 2 + 1) / (M ^ 4 + 1) * ((M ^ 2 + 1) * (M ^ 4 + 1)) = (M ^ 2 + 1) ^ 2 := by field_simp [ne_of_gt hM4] rw [hmul, Real.sqrt_sq hM2] have hring : 2 * ((M + 1) * Real.sqrt ((M ^ 2 + 1) / (M ^ 4 + 1))) * (2 * Real.sqrt ((M ^ 2 + 1) * (M ^ 4 + 1)) / (M * (M + 1))) = 4 * (Real.sqrt ((M ^ 2 + 1) / (M ^ 4 + 1)) * Real.sqrt ((M ^ 2 + 1) * (M ^ 4 + 1))) / M := by field_simp [hM0, hM1]; ring rw [hring, hsq] /-- **Miraculous Discriminant Identity**: `(M² + 1)(M⁴ + 1) - M²(M + 1)² = (M³ - 1)²`, so `(Q*(M) + √(Q*(M)² - 4)) / 2 = K*(M)`. -/ theorem QStar_to_KStar {M : ℝ} (hM : 1 ≤ M) : (QStar M + Real.sqrt (QStar M ^ 2 - 4)) / 2 = KStar M := by unfold QStar KStar have hMpos : 0 < M * (M + 1) := by positivity have hMne : M * (M + 1) ≠ 0 := ne_of_gt hMpos have hM3 : 0 ≤ M ^ 3 - 1 := by nlinarith have hsq : QStar M ^ 2 - 4 = (2 * (M ^ 3 - 1) / (M * (M + 1))) ^ 2 := by unfold QStar rw [div_pow, mul_pow, Real.sq_sqrt (by positivity)] field_simp [hMne] ring change (2 * Real.sqrt ((M ^ 2 + 1) * (M ^ 4 + 1)) / (M * (M + 1)) + Real.sqrt (QStar M ^ 2 - 4)) / 2 = _ rw [hsq, Real.sqrt_sq (by positivity)] field_simp [hMne] ring /-! ## 6. Concave Quadratic Defect & 5-Vertex Pentagon Reduction -/ /-- Pure polynomial defect `polyDefect M ξ a b` whose nonnegativity is equivalent to `baQ ξ a b (r*(M)) ≤ Q*(M)`. -/ def polyDefect (M ξ a b : ℝ) : ℝ := 4 * (M ^ 2 + 1) * (M ^ 4 + 1) * ξ * (a + b) - M * (M ^ 4 + 1) * ((ξ + 1) ^ 2 + (ξ * a - b) ^ 2) - M * (M + 1) ^ 2 * (M ^ 2 + 1) * ((ξ - 1) ^ 2 + (ξ * a + b) ^ 2) /-- **Concavity Along Any Line Segment**: since the quadratic part of `-polyDefect` is a positive sum of squares, `polyDefect` is concave along every segment in `(a, b)`. -/ lemma polyDefect_segment_nonneg {M ξ a₁ b₁ a₂ b₂ t : ℝ} (hM : 1 ≤ M) (ht0 : 0 ≤ t) (ht1 : t ≤ 1) (h1 : 0 ≤ polyDefect M ξ a₁ b₁) (h2 : 0 ≤ polyDefect M ξ a₂ b₂) : 0 ≤ polyDefect M ξ ((1 - t) * a₁ + t * a₂) ((1 - t) * b₁ + t * b₂) := by have hident : polyDefect M ξ ((1 - t) * a₁ + t * a₂) ((1 - t) * b₁ + t * b₂) = (1 - t) * polyDefect M ξ a₁ b₁ + t * polyDefect M ξ a₂ b₂ + t * (1 - t) * (M * (M ^ 4 + 1) * (ξ * (a₁ - a₂) - (b₁ - b₂)) ^ 2 + M * (M + 1) ^ 2 * (M ^ 2 + 1) * (ξ * (a₁ - a₂) + (b₁ - b₂)) ^ 2) := by unfold polyDefect; ring rw [hident] have hMpos : 0 ≤ M := by linarith have h1mt : 0 ≤ 1 - t := by linarith positivity /-- Exact positive-coefficient proof at vertex `V₁ = (M/(M+1), M/(M+1))`. -/ lemma polyDefect_V1 {M ξ : ℝ} (hξ1 : 1 ≤ ξ) (hξM : ξ ≤ M) : 0 ≤ polyDefect M ξ (M / (M + 1)) (M / (M + 1)) := by have hM1 : (0 : ℝ) < M + 1 := by linarith have hsq : (M + 1) ^ 2 * polyDefect M ξ (M / (M + 1)) (M / (M + 1)) ≥ 0 := by set u := ξ - 1 set v := M - ξ have hu : 0 ≤ u := by linarith have hv : 0 ≤ v := by linarith have hξ_eq : ξ = 1 + u := by ring have hM_eq : M = 1 + u + v := by ring have hclear : (M + 1) ^ 2 * polyDefect M ξ (M / (M + 1)) (M / (M + 1)) = 4 * (M ^ 2 + 1) * (M ^ 4 + 1) * ξ * (M + 1) * (M + M) - M * (M ^ 4 + 1) * ((ξ + 1) ^ 2 * (M + 1) ^ 2 + (ξ * M - M) ^ 2) - M * (M + 1) ^ 2 * (M ^ 2 + 1) * ((ξ - 1) ^ 2 * (M + 1) ^ 2 + (ξ * M + M) ^ 2) := by unfold polyDefect; field_simp [ne_of_gt hM1] rw [hclear, hξ_eq, hM_eq] have hpoly : 4 * ((1 + u + v) ^ 2 + 1) * ((1 + u + v) ^ 4 + 1) * (1 + u) * (1 + u + v + 1) * (1 + u + v + (1 + u + v)) - (1 + u + v) * ((1 + u + v) ^ 4 + 1) * (((1 + u) + 1) ^ 2 * (1 + u + v + 1) ^ 2 + ((1 + u) * (1 + u + v) - (1 + u + v)) ^ 2) - (1 + u + v) * (1 + u + v + 1) ^ 2 * ((1 + u + v) ^ 2 + 1) * (((1 + u) - 1) ^ 2 * (1 + u + v + 1) ^ 2 + ((1 + u) * (1 + u + v) + (1 + u + v)) ^ 2) = 64 * v ^ 2 + 248 * v ^ 3 + 420 * v ^ 4 + 396 * v ^ 5 + 216 * v ^ 6 + 64 * v ^ 7 + 8 * v ^ 8 + 128 * u * v + 808 * u * v ^ 2 + 1928 * u * v ^ 3 + 2400 * u * v ^ 4 + 1692 * u * v ^ 5 + 664 * u * v ^ 6 + 128 * u * v ^ 7 + 8 * u * v ^ 8 + 14 * u ^ 2 + 662 * u ^ 2 * v + 2864 * u ^ 2 * v ^ 2 + 5190 * u ^ 2 * v ^ 3 + 4900 * u ^ 2 * v ^ 4 + 2498 * u ^ 2 * v ^ 5 + 636 * u ^ 2 * v ^ 6 + 60 * u ^ 2 * v ^ 7 + 102 * u ^ 3 + 1624 * u ^ 3 * v + 5130 * u ^ 3 * v ^ 2 + 7000 * u ^ 3 * v ^ 3 + 4770 * u ^ 3 * v ^ 4 + 1576 * u ^ 3 * v ^ 5 + 196 * u ^ 3 * v ^ 6 + 268 * u ^ 4 + 2310 * u ^ 4 * v + 5280 * u ^ 4 * v ^ 2 + 5140 * u ^ 4 * v ^ 3 + 2260 * u ^ 4 * v ^ 4 + 364 * u ^ 4 * v ^ 5 + 366 * u ^ 5 + 1996 * u ^ 5 * v + 3164 * u ^ 5 * v ^ 2 + 1968 * u ^ 5 * v ^ 3 + 420 * u ^ 5 * v ^ 4 + 292 * u ^ 6 + 1034 * u ^ 6 * v + 1028 * u ^ 6 * v ^ 2 + 308 * u ^ 6 * v ^ 3 + 138 * u ^ 7 + 296 * u ^ 7 * v + 140 * u ^ 7 * v ^ 2 + 36 * u ^ 8 + 36 * u ^ 8 * v + 4 * u ^ 9 := by ring rw [hpoly] positivity exact nonneg_of_mul_nonneg_right hsq (by positivity) /-- Exact positive-coefficient proof at vertex `V₂ = (1/(M+1), M/(M+1))`. -/ lemma polyDefect_V2 {M ξ : ℝ} (hξ1 : 1 ≤ ξ) (hξM : ξ ≤ M) : 0 ≤ polyDefect M ξ (1 / (M + 1)) (M / (M + 1)) := by have hM1 : (0 : ℝ) < M + 1 := by linarith have hsq : (M + 1) ^ 2 * polyDefect M ξ (1 / (M + 1)) (M / (M + 1)) ≥ 0 := by set u := ξ - 1 set v := M - ξ have hu : 0 ≤ u := by linarith have hv : 0 ≤ v := by linarith have hξ_eq : ξ = 1 + u := by ring have hM_eq : M = 1 + u + v := by ring have hclear : (M + 1) ^ 2 * polyDefect M ξ (1 / (M + 1)) (M / (M + 1)) = 4 * (M ^ 2 + 1) * (M ^ 4 + 1) * ξ * (M + 1) * (1 + M) - M * (M ^ 4 + 1) * ((ξ + 1) ^ 2 * (M + 1) ^ 2 + (ξ * 1 - M) ^ 2) - M * (M + 1) ^ 2 * (M ^ 2 + 1) * ((ξ - 1) ^ 2 * (M + 1) ^ 2 + (ξ * 1 + M) ^ 2) := by unfold polyDefect; field_simp [ne_of_gt hM1] rw [hclear, hξ_eq, hM_eq] have hpoly : 4 * ((1 + u + v) ^ 2 + 1) * ((1 + u + v) ^ 4 + 1) * (1 + u) * (1 + u + v + 1) * (1 + (1 + u + v)) - (1 + u + v) * ((1 + u + v) ^ 4 + 1) * (((1 + u) + 1) ^ 2 * (1 + u + v + 1) ^ 2 + ((1 + u) * 1 - (1 + u + v)) ^ 2) - (1 + u + v) * (1 + u + v + 1) ^ 2 * ((1 + u + v) ^ 2 + 1) * (((1 + u) - 1) ^ 2 * (1 + u + v + 1) ^ 2 + ((1 + u) * 1 + (1 + u + v)) ^ 2) = 70 * v ^ 2 + 210 * v ^ 3 + 300 * v ^ 4 + 250 * v ^ 5 + 124 * v ^ 6 + 34 * v ^ 7 + 4 * v ^ 8 + 160 * u * v + 770 * u * v ^ 2 + 1520 * u * v ^ 3 + 1650 * u * v ^ 4 + 1048 * u * v ^ 5 + 378 * u * v ^ 6 + 68 * u * v ^ 7 + 4 * u * v ^ 8 + 40 * u ^ 2 + 720 * u ^ 2 * v + 2430 * u ^ 2 * v ^ 2 + 3760 * u ^ 2 * v ^ 3 + 3160 * u ^ 2 * v ^ 4 + 1466 * u ^ 2 * v ^ 5 + 344 * u ^ 2 * v ^ 6 + 30 * u ^ 2 * v ^ 7 + 160 * u ^ 3 + 1500 * u ^ 3 * v + 3880 * u ^ 3 * v ^ 2 + 4640 * u ^ 3 * v ^ 3 + 2850 * u ^ 3 * v ^ 4 + 860 * u ^ 3 * v ^ 5 + 98 * u ^ 3 * v ^ 6 + 290 * u ^ 4 + 1830 * u ^ 4 * v + 3580 * u ^ 4 * v ^ 2 + 3110 * u ^ 4 * v ^ 3 + 1240 * u ^ 4 * v ^ 4 + 182 * u ^ 4 * v ^ 5 + 310 * u ^ 5 + 1384 * u ^ 5 * v + 1934 * u ^ 5 * v ^ 2 + 1084 * u ^ 5 * v ^ 3 + 210 * u ^ 5 * v ^ 4 + 208 * u ^ 6 + 638 * u ^ 6 * v + 568 * u ^ 6 * v ^ 2 + 154 * u ^ 6 * v ^ 3 + 86 * u ^ 7 + 164 * u ^ 7 * v + 70 * u ^ 7 * v ^ 2 + 20 * u ^ 8 + 18 * u ^ 8 * v + 2 * u ^ 9 := by ring rw [hpoly] positivity exact nonneg_of_mul_nonneg_right hsq (by positivity) /-- Exact positive-coefficient proof at vertex `V₃ = (M/(M+1), 1/(M+1))` (tight at `ξ = M`). -/ lemma polyDefect_V3 {M ξ : ℝ} (hξ1 : 1 ≤ ξ) (hξM : ξ ≤ M) : 0 ≤ polyDefect M ξ (M / (M + 1)) (1 / (M + 1)) := by have hM1 : (0 : ℝ) < M + 1 := by linarith have hsq : (M + 1) ^ 2 * polyDefect M ξ (M / (M + 1)) (1 / (M + 1)) ≥ 0 := by set u := ξ - 1 set v := M - ξ have hu : 0 ≤ u := by linarith have hv : 0 ≤ v := by linarith have hξ_eq : ξ = 1 + u := by ring have hM_eq : M = 1 + u + v := by ring have hclear : (M + 1) ^ 2 * polyDefect M ξ (M / (M + 1)) (1 / (M + 1)) = 4 * (M ^ 2 + 1) * (M ^ 4 + 1) * ξ * (M + 1) * (M + 1) - M * (M ^ 4 + 1) * ((ξ + 1) ^ 2 * (M + 1) ^ 2 + (ξ * M - 1) ^ 2) - M * (M + 1) ^ 2 * (M ^ 2 + 1) * ((ξ - 1) ^ 2 * (M + 1) ^ 2 + (ξ * M + 1) ^ 2) := by unfold polyDefect; field_simp [ne_of_gt hM1] rw [hclear, hξ_eq, hM_eq] have hpoly : 4 * ((1 + u + v) ^ 2 + 1) * ((1 + u + v) ^ 4 + 1) * (1 + u) * (1 + u + v + 1) * (1 + u + v + 1) - (1 + u + v) * ((1 + u + v) ^ 4 + 1) * (((1 + u) + 1) ^ 2 * (1 + u + v + 1) ^ 2 + ((1 + u) * (1 + u + v) - 1) ^ 2) - (1 + u + v) * (1 + u + v + 1) ^ 2 * ((1 + u + v) ^ 2 + 1) * (((1 + u) - 1) ^ 2 * (1 + u + v + 1) ^ 2 + ((1 + u) * (1 + u + v) + 1) ^ 2) = 70 * v ^ 2 + 210 * v ^ 3 + 300 * v ^ 4 + 250 * v ^ 5 + 124 * v ^ 6 + 34 * v ^ 7 + 4 * v ^ 8 + 120 * u * v + 630 * u * v ^ 2 + 1300 * u * v ^ 3 + 1450 * u * v ^ 4 + 940 * u * v ^ 5 + 346 * u * v ^ 6 + 64 * u * v ^ 7 + 4 * u * v ^ 8 + 420 * u ^ 2 * v + 1700 * u ^ 2 * v ^ 2 + 2850 * u ^ 2 * v ^ 3 + 2520 * u ^ 2 * v ^ 4 + 1220 * u ^ 2 * v ^ 5 + 300 * u ^ 2 * v ^ 6 + 28 * u ^ 2 * v ^ 7 + 700 * u ^ 3 * v + 2350 * u ^ 3 * v ^ 2 + 3160 * u ^ 3 * v ^ 3 + 2100 * u ^ 3 * v ^ 4 + 680 * u ^ 3 * v ^ 5 + 84 * u ^ 3 * v ^ 6 + 700 * u ^ 4 * v + 1900 * u ^ 4 * v ^ 2 + 1930 * u ^ 4 * v ^ 3 + 860 * u ^ 4 * v ^ 4 + 140 * u ^ 4 * v ^ 5 + 444 * u ^ 5 * v + 914 * u ^ 5 * v ^ 2 + 624 * u ^ 5 * v ^ 3 + 140 * u ^ 5 * v ^ 4 + 176 * u ^ 6 * v + 244 * u ^ 6 * v ^ 2 + 84 * u ^ 6 * v ^ 3 + 40 * u ^ 7 * v + 28 * u ^ 7 * v ^ 2 + 4 * u ^ 8 * v := by ring rw [hpoly] positivity exact nonneg_of_mul_nonneg_right hsq (by positivity) /-- Exact positive-coefficient proof at vertex `V₄ = (1 - M/(ξ(M+1)), 1/(M+1))` (tight at `ξ = M`). -/ lemma polyDefect_V4 {M ξ : ℝ} (hξ1 : 1 ≤ ξ) (hξM : ξ ≤ M) : 0 ≤ polyDefect M ξ ((ξ * (M + 1) - M) / (ξ * (M + 1))) (1 / (M + 1)) := by have hξ0 : (0 : ℝ) < ξ := by linarith have hM1 : (0 : ℝ) < M + 1 := by linarith have hD : (0 : ℝ) < ξ * (M + 1) := by positivity have hsq : (ξ * (M + 1)) ^ 2 * polyDefect M ξ ((ξ * (M + 1) - M) / (ξ * (M + 1))) (1 / (M + 1)) ≥ 0 := by set u := ξ - 1 set v := M - ξ have hu : 0 ≤ u := by linarith have hv : 0 ≤ v := by linarith have hξ_eq : ξ = 1 + u := by ring have hM_eq : M = 1 + u + v := by ring have hclear : (ξ * (M + 1)) ^ 2 * polyDefect M ξ ((ξ * (M + 1) - M) / (ξ * (M + 1))) (1 / (M + 1)) = 4 * (M ^ 2 + 1) * (M ^ 4 + 1) * ξ * (ξ * (M + 1)) * ((ξ * (M + 1) - M) + ξ) - M * (M ^ 4 + 1) * ((ξ + 1) ^ 2 * (ξ * (M + 1)) ^ 2 + (ξ * (ξ * (M + 1) - M) - ξ) ^ 2) - M * (M + 1) ^ 2 * (M ^ 2 + 1) * ((ξ - 1) ^ 2 * (ξ * (M + 1)) ^ 2 + (ξ * (ξ * (M + 1) - M) + ξ) ^ 2) := by unfold polyDefect; field_simp [ne_of_gt hξ0, ne_of_gt hM1] rw [hclear, hξ_eq, hM_eq] have hpoly : 4 * ((1 + u + v) ^ 2 + 1) * ((1 + u + v) ^ 4 + 1) * (1 + u) * ((1 + u) * (1 + u + v + 1)) * (((1 + u) * (1 + u + v + 1) - (1 + u + v)) + (1 + u)) - (1 + u + v) * ((1 + u + v) ^ 4 + 1) * (((1 + u) + 1) ^ 2 * ((1 + u) * (1 + u + v + 1)) ^ 2 + ((1 + u) * ((1 + u) * (1 + u + v + 1) - (1 + u + v)) - (1 + u)) ^ 2) - (1 + u + v) * (1 + u + v + 1) ^ 2 * ((1 + u + v) ^ 2 + 1) * (((1 + u) - 1) ^ 2 * ((1 + u) * (1 + u + v + 1)) ^ 2 + ((1 + u) * ((1 + u) * (1 + u + v + 1) - (1 + u + v)) + (1 + u)) ^ 2) = 64 * v ^ 2 + 136 * v ^ 3 + 140 * v ^ 4 + 84 * v ^ 5 + 28 * v ^ 6 + 4 * v ^ 7 + 144 * u * v + 720 * u * v ^ 2 + 1272 * u * v ^ 3 + 1236 * u * v ^ 4 + 724 * u * v ^ 5 + 252 * u * v ^ 6 + 48 * u * v ^ 7 + 4 * u * v ^ 8 + 744 * u ^ 2 * v + 2828 * u ^ 2 * v ^ 2 + 4500 * u ^ 2 * v ^ 3 + 3996 * u ^ 2 * v ^ 4 + 2116 * u ^ 2 * v ^ 5 + 660 * u ^ 2 * v ^ 6 + 112 * u ^ 2 * v ^ 7 + 8 * u ^ 2 * v ^ 8 + 1776 * u ^ 3 * v + 5948 * u ^ 3 * v ^ 2 + 8504 * u ^ 3 * v ^ 3 + 6644 * u ^ 3 * v ^ 4 + 2996 * u ^ 3 * v ^ 5 + 760 * u ^ 3 * v ^ 6 + 96 * u ^ 3 * v ^ 7 + 4 * u ^ 3 * v ^ 8 + 2600 * u ^ 4 * v + 7776 * u ^ 4 * v ^ 2 + 9696 * u ^ 4 * v ^ 3 + 6344 * u ^ 4 * v ^ 4 + 2260 * u ^ 4 * v ^ 5 + 408 * u ^ 4 * v ^ 6 + 28 * u ^ 4 * v ^ 7 + 2572 * u ^ 5 * v + 6688 * u ^ 5 * v ^ 2 + 6936 * u ^ 5 * v ^ 3 + 3540 * u ^ 5 * v ^ 4 + 880 * u ^ 5 * v ^ 5 + 84 * u ^ 5 * v ^ 6 + 1768 * u ^ 6 * v + 3812 * u ^ 6 * v ^ 2 + 3064 * u ^ 6 * v ^ 3 + 1080 * u ^ 6 * v ^ 4 + 140 * u ^ 6 * v ^ 5 + 836 * u ^ 7 * v + 1392 * u ^ 7 * v ^ 2 + 768 * u ^ 7 * v ^ 3 + 140 * u ^ 7 * v ^ 4 + 260 * u ^ 8 * v + 296 * u ^ 8 * v ^ 2 + 84 * u ^ 8 * v ^ 3 + 48 * u ^ 9 * v + 28 * u ^ 9 * v ^ 2 + 4 * u ^ 10 * v := by ring rw [hpoly] positivity exact nonneg_of_mul_nonneg_right hsq (by positivity) /-- Exact positive-coefficient proof at vertex `V₅ = (1/(M+1), (Mξ + M + 1)/((M+1)(2M+1)))`. -/ lemma polyDefect_V5 {M ξ : ℝ} (hξ1 : 1 ≤ ξ) (hξM : ξ ≤ M) : 0 ≤ polyDefect M ξ (1 / (M + 1)) ((M * ξ + M + 1) / ((M + 1) * (2 * M + 1))) := by have hM1 : (0 : ℝ) < M + 1 := by linarith have h2M1 : (0 : ℝ) < 2 * M + 1 := by linarith have hD : (0 : ℝ) < (M + 1) * (2 * M + 1) := by positivity have hsq : ((M + 1) * (2 * M + 1)) ^ 2 * polyDefect M ξ (1 / (M + 1)) ((M * ξ + M + 1) / ((M + 1) * (2 * M + 1))) ≥ 0 := by set u := ξ - 1 set v := M - ξ have hu : 0 ≤ u := by linarith have hv : 0 ≤ v := by linarith have hξ_eq : ξ = 1 + u := by ring have hM_eq : M = 1 + u + v := by ring have hclear : ((M + 1) * (2 * M + 1)) ^ 2 * polyDefect M ξ (1 / (M + 1)) ((M * ξ + M + 1) / ((M + 1) * (2 * M + 1))) = 4 * (M ^ 2 + 1) * (M ^ 4 + 1) * ξ * ((M + 1) * (2 * M + 1)) * ((2 * M + 1) + (M * ξ + M + 1)) - M * (M ^ 4 + 1) * ((ξ + 1) ^ 2 * ((M + 1) * (2 * M + 1)) ^ 2 + (ξ * (2 * M + 1) - (M * ξ + M + 1)) ^ 2) - M * (M + 1) ^ 2 * (M ^ 2 + 1) * ((ξ - 1) ^ 2 * ((M + 1) * (2 * M + 1)) ^ 2 + (ξ * (2 * M + 1) + (M * ξ + M + 1)) ^ 2) := by have h1 : 1 / (M + 1) = (2 * M + 1) / ((M + 1) * (2 * M + 1)) := by rw [mul_comm (M + 1), div_mul_eq_div_div, div_self (ne_of_gt h2M1)] rw [h1] set D := (M + 1) * (2 * M + 1) have hDne : D ≠ 0 := ne_of_gt hD unfold polyDefect field_simp [hDne] rw [hclear, hξ_eq, hM_eq] have hpoly : 4 * ((1 + u + v) ^ 2 + 1) * ((1 + u + v) ^ 4 + 1) * (1 + u) * ((1 + u + v + 1) * (2 * (1 + u + v) + 1)) * ((2 * (1 + u + v) + 1) + ((1 + u + v) * (1 + u) + (1 + u + v) + 1)) - (1 + u + v) * ((1 + u + v) ^ 4 + 1) * (((1 + u) + 1) ^ 2 * ((1 + u + v + 1) * (2 * (1 + u + v) + 1)) ^ 2 + ((1 + u) * (2 * (1 + u + v) + 1) - ((1 + u + v) * (1 + u) + (1 + u + v) + 1)) ^ 2) - (1 + u + v) * (1 + u + v + 1) ^ 2 * ((1 + u + v) ^ 2 + 1) * (((1 + u) - 1) ^ 2 * ((1 + u + v + 1) * (2 * (1 + u + v) + 1)) ^ 2 + ((1 + u) * (2 * (1 + u + v) + 1) + ((1 + u + v) * (1 + u) + (1 + u + v) + 1)) ^ 2) = 576 * v ^ 2 + 1992 * v ^ 3 + 3148 * v ^ 4 + 2980 * v ^ 5 + 1820 * v ^ 6 + 708 * v ^ 7 + 160 * v ^ 8 + 16 * v ^ 9 + 1200 * u * v + 6944 * u * v ^ 2 + 15736 * u * v ^ 3 + 19844 * u * v ^ 4 + 15604 * u * v ^ 5 + 7804 * u * v ^ 6 + 2376 * u * v ^ 7 + 388 * u * v ^ 8 + 24 * u * v ^ 9 + 224 * u ^ 2 + 5880 * u ^ 2 * v + 23732 * u ^ 2 * v ^ 2 + 43508 * u ^ 2 * v ^ 3 + 45556 * u ^ 2 * v ^ 4 + 29064 * u ^ 2 * v ^ 5 + 11116 * u ^ 2 * v ^ 6 + 2312 * u ^ 2 * v ^ 7 + 196 * u ^ 2 * v ^ 8 + 928 * u ^ 3 + 12848 * u ^ 3 * v + 41260 * u ^ 3 * v ^ 2 + 62584 * u ^ 3 * v ^ 3 + 53040 * u ^ 3 * v ^ 4 + 25760 * u ^ 3 * v ^ 5 + 6664 * u ^ 3 * v ^ 6 + 704 * u ^ 3 * v ^ 7 + 1704 * u ^ 4 + 16472 * u ^ 4 * v + 43156 * u ^ 4 * v ^ 2 + 52820 * u ^ 4 * v ^ 3 + 34020 * u ^ 4 * v ^ 4 + 11144 * u ^ 4 * v ^ 5 + 1456 * u ^ 4 * v ^ 6 + 1856 * u ^ 5 + 13684 * u ^ 5 * v + 28668 * u ^ 5 * v ^ 2 + 26600 * u ^ 5 * v ^ 3 + 11536 * u ^ 5 * v ^ 4 + 1904 * u ^ 5 * v ^ 5 + 1340 * u ^ 6 + 7584 * u ^ 6 * v + 11956 * u ^ 6 * v ^ 2 + 7448 * u ^ 6 * v ^ 3 + 1624 * u ^ 6 * v ^ 4 + 664 * u ^ 7 + 2736 * u ^ 7 * v + 2872 * u ^ 7 * v ^ 2 + 896 * u ^ 7 * v ^ 3 + 220 * u ^ 8 + 584 * u ^ 8 * v + 304 * u ^ 8 * v ^ 2 + 44 * u ^ 9 + 56 * u ^ 9 * v + 4 * u ^ 10 := by ring rw [hpoly] positivity exact nonneg_of_mul_nonneg_right hsq (by positivity) /-- **5-Vertex Pentagon Theorem**: `polyDefect M ξ a b ≥ 0` on the entire feasible pentagon for every `1 ≤ ξ ≤ M`. -/ theorem polyDefect_pentagon_nonneg {M ξ a b : ℝ} (hξ1 : 1 ≤ ξ) (hξM : ξ ≤ M) (ha_lo : 1 / (M + 1) ≤ a) (ha_hi : a ≤ M / (M + 1)) (hb_lo : 1 / (M + 1) ≤ b) (hb_hi : b ≤ M / (M + 1)) (hcut : ξ + 1 ≤ ξ * a + (2 * M + 1) * b) : 0 ≤ polyDefect M ξ a b := by have hM1_le : 1 ≤ M := le_trans hξ1 hξM have hM1 : 0 < M + 1 := by linarith have h2M1 : 0 < 2 * M + 1 := by linarith have hξ0 : 0 < ξ := by linarith set lo := 1 / (M + 1) set hi := M / (M + 1) set acut := (ξ * (M + 1) - M) / (ξ * (M + 1)) set bcut := (M * ξ + M + 1) / ((M + 1) * (2 * M + 1)) have hV1 : 0 ≤ polyDefect M ξ hi hi := polyDefect_V1 hξ1 hξM have hV2 : 0 ≤ polyDefect M ξ lo hi := polyDefect_V2 hξ1 hξM have hV3 : 0 ≤ polyDefect M ξ hi lo := polyDefect_V3 hξ1 hξM have hV4 : 0 ≤ polyDefect M ξ acut lo := polyDefect_V4 hξ1 hξM have hV5 : 0 ≤ polyDefect M ξ lo bcut := polyDefect_V5 hξ1 hξM have hTop : 0 ≤ polyDefect M ξ a hi := by by_cases hM_eq : M = 1 · have ha_eq : a = hi := by have : lo = hi := by dsimp only [lo, hi]; rw [hM_eq] linarith rw [ha_eq]; exact hV1 · have hgap : 0 < hi - lo := by dsimp only [lo, hi]; rw [← sub_div]; exact div_pos (by linarith [lt_of_le_of_ne hM1_le (Ne.symm hM_eq)]) hM1 set t := (a - lo) / (hi - lo) have ht0 : 0 ≤ t := div_nonneg (by linarith) (le_of_lt hgap) have ht1 : t ≤ 1 := (div_le_one hgap).mpr (by linarith) have hseg := polyDefect_segment_nonneg hM1_le ht0 ht1 hV2 hV1 have ha_eq : (1 - t) * lo + t * hi = a := by dsimp only [t]; field_simp [ne_of_gt hgap]; ring have hb_eq : (1 - t) * hi + t * hi = hi := by ring rwa [ha_eq, hb_eq] at hseg have hlo_le_acut : lo ≤ acut := by dsimp only [lo, acut] rw [div_le_div_iff₀ hM1 (by positivity)] have hM0 : 0 ≤ M := by linarith have hξ0' : 0 ≤ ξ - 1 := by linarith have : 0 ≤ M * (M + 1) * (ξ - 1) := by positivity linarith have hacut_le_hi : acut ≤ hi := by dsimp only [acut, hi] rw [div_le_div_iff₀ (by positivity) hM1] nlinarith by_cases ha_side : a ≤ acut · set bmin := (ξ + 1 - ξ * a) / (2 * M + 1) have hb_ge : bmin ≤ b := by dsimp only [bmin]; rw [div_le_iff₀ h2M1]; linarith have hbmin_le_hi : bmin ≤ hi := le_trans hb_ge hb_hi have hBot : 0 ≤ polyDefect M ξ a bmin := by by_cases hgap0 : acut = lo · have ha_eq : a = lo := by linarith have hb_eq : bmin = bcut := by dsimp only [bmin, bcut]; rw [ha_eq]; dsimp only [lo] field_simp [ne_of_gt hM1, ne_of_gt h2M1]; ring rw [ha_eq, hb_eq]; exact hV5 · have hgap : 0 < acut - lo := sub_pos.mpr (lt_of_le_of_ne hlo_le_acut (Ne.symm hgap0)) set t := (a - lo) / (acut - lo) have ht0 : 0 ≤ t := div_nonneg (by linarith) (le_of_lt hgap) have ht1 : t ≤ 1 := (div_le_one hgap).mpr (by linarith) have hseg := polyDefect_segment_nonneg hM1_le ht0 ht1 hV5 hV4 have ha_eq : (1 - t) * lo + t * acut = a := by dsimp only [t]; field_simp [ne_of_gt hgap]; ring have hb_eq : (1 - t) * bcut + t * lo = bmin := by have h1 : bcut - lo = (ξ * (acut - lo)) / (2 * M + 1) := by dsimp only [bcut, lo, acut]; field_simp [ne_of_gt hξ0, ne_of_gt hM1, ne_of_gt h2M1]; ring have h2 : bcut - bmin = (ξ * (a - lo)) / (2 * M + 1) := by dsimp only [bcut, bmin, lo]; field_simp [ne_of_gt hM1, ne_of_gt h2M1]; ring dsimp only [t] have hlin : (1 - (a - lo) / (acut - lo)) * bcut + ((a - lo) / (acut - lo)) * lo = bcut - ((a - lo) / (acut - lo)) * (bcut - lo) := by ring rw [hlin, h1] have : (a - lo) / (acut - lo) * (ξ * (acut - lo) / (2 * M + 1)) = ξ * (a - lo) / (2 * M + 1) := by field_simp [ne_of_gt hgap] rw [this]; linarith rwa [ha_eq, hb_eq] at hseg by_cases hveq : hi = bmin · have hb_eq : b = hi := by linarith rw [hb_eq]; exact hTop · have hvgap : 0 < hi - bmin := sub_pos.mpr (lt_of_le_of_ne hbmin_le_hi (Ne.symm hveq)) set s := (b - bmin) / (hi - bmin) have hs0 : 0 ≤ s := div_nonneg (by linarith) (le_of_lt hvgap) have hs1 : s ≤ 1 := (div_le_one hvgap).mpr (by linarith) have hseg := polyDefect_segment_nonneg hM1_le hs0 hs1 hBot hTop have ha_eq : (1 - s) * a + s * a = a := by ring have hb_eq : (1 - s) * bmin + s * hi = b := by dsimp only [s]; field_simp [ne_of_gt hvgap]; ring rwa [ha_eq, hb_eq] at hseg · push Not at ha_side have hBot : 0 ≤ polyDefect M ξ a lo := by have hgap : 0 < hi - acut := sub_pos.mpr (lt_of_lt_of_le ha_side ha_hi) set t := (a - acut) / (hi - acut) have ht0 : 0 ≤ t := div_nonneg (by linarith) (le_of_lt hgap) have ht1 : t ≤ 1 := (div_le_one hgap).mpr (by linarith) have hseg := polyDefect_segment_nonneg hM1_le ht0 ht1 hV4 hV3 have ha_eq : (1 - t) * acut + t * hi = a := by dsimp only [t]; field_simp [ne_of_gt hgap]; ring have hb_eq : (1 - t) * lo + t * lo = lo := by ring rwa [ha_eq, hb_eq] at hseg by_cases hveq : hi = lo · have hb_eq : b = hi := by linarith rw [hb_eq]; exact hTop · have hvgap : 0 < hi - lo := sub_pos.mpr (lt_of_le_of_ne (le_trans hb_lo hb_hi) (Ne.symm hveq)) set s := (b - lo) / (hi - lo) have hs0 : 0 ≤ s := div_nonneg (by linarith) (le_of_lt hvgap) have hs1 : s ≤ 1 := (div_le_one hvgap).mpr (by linarith) have hseg := polyDefect_segment_nonneg hM1_le hs0 hs1 hBot hTop have ha_eq : (1 - s) * a + s * a = a := by ring have hb_eq : (1 - s) * lo + s * hi = b := by dsimp only [s]; field_simp [ne_of_gt hvgap]; ring rwa [ha_eq, hb_eq] at hseg /-- Equivalence: `polyDefect M ξ a b ≥ 0` implies `baQ ξ a b (r*(M)) ≤ Q*(M)`. -/ lemma baQ_le_QStar_of_polyDefect {M ξ a b : ℝ} (hM : 1 ≤ M) (hξ : 0 < ξ) (hab : 0 < a + b) (hdef : 0 ≤ polyDefect M ξ a b) : baQ ξ a b (rStar M) ≤ QStar M := by have hr : 0 < rStar M := rStar_pos hM have hden : 0 < 2 * rStar M * ξ * (a + b) := by positivity unfold baQ rw [div_le_iff₀ hden, rStar_sq hM] have hprod : QStar M * (2 * rStar M * ξ * (a + b)) = (2 * rStar M * QStar M) * (ξ * (a + b)) := by ring rw [hprod, two_mul_rStar_mul_QStar hM] have hM0 : 0 < M := by linarith have hM4 : 0 < M ^ 4 + 1 := by positivity have hclear : M * (M ^ 4 + 1) * ((ξ + 1) ^ 2 + (ξ * a - b) ^ 2 + (M + 1) ^ 2 * (M ^ 2 + 1) / (M ^ 4 + 1) * ((ξ - 1) ^ 2 + (ξ * a + b) ^ 2)) ≤ M * (M ^ 4 + 1) * (4 * (M ^ 2 + 1) / M * (ξ * (a + b))) := by have hL : M * (M ^ 4 + 1) * ((ξ + 1) ^ 2 + (ξ * a - b) ^ 2 + (M + 1) ^ 2 * (M ^ 2 + 1) / (M ^ 4 + 1) * ((ξ - 1) ^ 2 + (ξ * a + b) ^ 2)) = M * (M ^ 4 + 1) * ((ξ + 1) ^ 2 + (ξ * a - b) ^ 2) + M * (M + 1) ^ 2 * (M ^ 2 + 1) * ((ξ - 1) ^ 2 + (ξ * a + b) ^ 2) := by field_simp [ne_of_gt hM4] have hR : M * (M ^ 4 + 1) * (4 * (M ^ 2 + 1) / M * (ξ * (a + b))) = 4 * (M ^ 2 + 1) * (M ^ 4 + 1) * ξ * (a + b) := by field_simp [ne_of_gt hM0] rw [hL, hR] unfold polyDefect at hdef linarith exact le_of_mul_le_mul_left hclear (by positivity) /-! ## 7. Main Theorem: Universal Closed-Form Beurling–Ahlfors Dilatation Bound -/ /-- **Algebraic Master Bound (Both Sides `1/M ≤ ξ ≤ M`)**. -/ theorem baQ_le_QStar_all_xi {M ξ a b : ℝ} (hM : 1 ≤ M) (hξ_lo : 1 / M ≤ ξ) (hξ_hi : ξ ≤ M) (ha_lo : 1 / (M + 1) ≤ a) (ha_hi : a ≤ M / (M + 1)) (hb_lo : 1 / (M + 1) ≤ b) (hb_hi : b ≤ M / (M + 1)) (hcL : ξ + 1 ≤ (2 * M + 1) * ξ * a + b) (hcR : ξ + 1 ≤ ξ * a + (2 * M + 1) * b) : baQ ξ a b (rStar M) ≤ QStar M := by have hM0 : 0 < M := by linarith have hξ_pos : 0 < ξ := lt_of_lt_of_le (by positivity) hξ_lo have hM1 : 0 < M + 1 := by linarith have hab : 0 < a + b := by have : 0 < 1 / (M + 1) := by positivity linarith by_cases h1 : 1 ≤ ξ · exact baQ_le_QStar_of_polyDefect hM hξ_pos hab (polyDefect_pentagon_nonneg h1 hξ_hi ha_lo ha_hi hb_lo hb_hi hcR) · push Not at h1 rw [← baQ_inv_symm (ne_of_gt hξ_pos)] have hinv1 : 1 ≤ 1 / ξ := (one_le_div hξ_pos).mpr (le_of_lt h1) have hinvM : 1 / ξ ≤ M := by rw [div_le_iff₀ hξ_pos] have := (div_le_iff₀ hM0).mp hξ_lo linarith have hcut' : 1 / ξ + 1 ≤ (1 / ξ) * b + (2 * M + 1) * a := by have := mul_le_mul_of_nonneg_left hcL (le_of_lt (inv_pos.mpr hξ_pos)) have hL : ξ⁻¹ * (ξ + 1) = 1 / ξ + 1 := by field_simp [ne_of_gt hξ_pos]; ring have hR : ξ⁻¹ * ((2 * M + 1) * ξ * a + b) = (1 / ξ) * b + (2 * M + 1) * a := by field_simp [ne_of_gt hξ_pos]; ring linarith exact baQ_le_QStar_of_polyDefect hM (by positivity) (by linarith) (polyDefect_pentagon_nonneg hinv1 hinvM hb_lo hb_hi ha_lo ha_hi hcut') /-- **MAIN THEOREM 1 (Universal Closed-Form Beurling–Ahlfors Dilatation Theorem)**: For EVERY `M ≥ 1`, EVERY `M`-quasisymmetric homeomorphism `h : ℝ → ℝ`, and EVERY point `(x, y)` in the upper half-plane `ℍ` (`y > 0`), the Beurling–Ahlfors extension with optimal parameter `r*(M) = (M + 1) √((M² + 1) / (M⁴ + 1))` satisfies `K(DF_{r*(M)}[h](x, y)) ≤ (√((M² + 1)(M⁴ + 1)) + M³ - 1) / (M(M + 1))`. -/ theorem beurlingAhlfors_exact_bound {M : ℝ} {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : baDilatation h (rStar M) x y ≤ KStar M := by have hr : 0 < rStar M := rStar_pos hh.one_le have hK1 : 1 ≤ baDilatation h (rStar M) x y := baDilatation_ge_one hh hr hy have hadd := baDilatation_add_inv_eq hh (x := x) hr hy rcases qs_xi_bounds hh x y hy with ⟨hξ_lo, hξ_hi⟩ rcases qs_a_bounds hh x y hy with ⟨ha_lo, ha_hi⟩ rcases qs_b_bounds hh x y hy with ⟨hb_lo, hb_hi⟩ have hcL := qs_coupled_ineq_left hh x y hy have hcR := qs_coupled_ineq_right hh x y hy have hQ : baDilatation h (rStar M) x y + (baDilatation h (rStar M) x y)⁻¹ ≤ QStar M := by rw [hadd] exact baQ_le_QStar_all_xi hh.one_le hξ_lo hξ_hi ha_lo ha_hi hb_lo hb_hi hcL hcR calc baDilatation h (rStar M) x y ≤ (QStar M + Real.sqrt (QStar M ^ 2 - 4)) / 2 := le_of_add_inv_le hK1 hQ _ = KStar M := QStar_to_KStar hh.one_le /-! ## 8. Strict Global Superiority Over Lehtinen (1983/1984) for EVERY `M > 1` -/ theorem KStar_one : KStar 1 = 1 := by unfold KStar; norm_num /-- **Beats Lehtinen's Linear Bound `2M - 1` Strictly for EVERY `M > 1`**. -/ theorem KStar_lt_two_M_sub_one {M : ℝ} (hM : 1 < M) : KStar M < 2 * M - 1 := by unfold KStar have hMpos : 0 < M * (M + 1) := by positivity rw [div_lt_iff₀ hMpos] have htarget : Real.sqrt ((M ^ 2 + 1) * (M ^ 4 + 1)) < M ^ 3 + M ^ 2 - M + 1 := by have hrhs : 0 < M ^ 3 + M ^ 2 - M + 1 := by nlinarith rw [Real.sqrt_lt' hrhs] set s := M - 1 have hs : 0 < s := by linarith have hM_eq : M = 1 + s := by ring rw [hM_eq] have hdiff : ((1 + s) ^ 3 + (1 + s) ^ 2 - (1 + s) + 1) ^ 2 - ((1 + s) ^ 2 + 1) * ((1 + s) ^ 4 + 1) = 4 * s + 10 * s ^ 2 + 12 * s ^ 3 + 8 * s ^ 4 + 2 * s ^ 5 := by ring have hpos : 0 < 4 * s + 10 * s ^ 2 + 12 * s ^ 3 + 8 * s ^ 4 + 2 * s ^ 5 := by positivity linarith nlinarith /-- **Beats Lehtinen's Power Bound `M^{3/2} = M √M` Strictly for EVERY `M > 1`**. -/ theorem KStar_lt_M_mul_sqrt_M {M : ℝ} (hM : 1 < M) : KStar M < M * Real.sqrt M := by unfold KStar have hMpos : 0 < M * (M + 1) := by positivity rw [div_lt_iff₀ hMpos] set x := Real.sqrt M have hx1 : 1 < x := by rw [show (1 : ℝ) = Real.sqrt 1 by norm_num] exact Real.sqrt_lt_sqrt (by norm_num) hM have hx2 : x ^ 2 = M := Real.sq_sqrt (by linarith) set t := x - 1 have ht : 0 < t := by linarith have hx_eq : x = 1 + t := by ring have hM_eq : M = (1 + t) ^ 2 := by rw [← hx_eq, hx2] have htarget : Real.sqrt ((M ^ 2 + 1) * (M ^ 4 + 1)) < x ^ 7 - x ^ 6 + x ^ 5 + 1 := by have hrhs : 0 < x ^ 7 - x ^ 6 + x ^ 5 + 1 := by rw [hx_eq] have : (1 + t) ^ 7 - (1 + t) ^ 6 + (1 + t) ^ 5 + 1 = 2 + 6 * t + 16 * t ^ 2 + 25 * t ^ 3 + 25 * t ^ 4 + 16 * t ^ 5 + 6 * t ^ 6 + t ^ 7 := by ring rw [this]; positivity rw [Real.sqrt_lt' hrhs, hM_eq, hx_eq] have hdiff : ((1 + t) ^ 7 - (1 + t) ^ 6 + (1 + t) ^ 5 + 1) ^ 2 - (((1 + t) ^ 2) ^ 2 + 1) * (((1 + t) ^ 2) ^ 4 + 1) = 12 * t ^ 3 + 90 * t ^ 4 + 316 * t ^ 5 + 689 * t ^ 6 + 1038 * t ^ 7 + 1133 * t ^ 8 + 912 * t ^ 9 + 540 * t ^ 10 + 230 * t ^ 11 + 67 * t ^ 12 + 12 * t ^ 13 + t ^ 14 := by ring have hpos : 0 < 12 * t ^ 3 + 90 * t ^ 4 + 316 * t ^ 5 + 689 * t ^ 6 + 1038 * t ^ 7 + 1133 * t ^ 8 + 912 * t ^ 9 + 540 * t ^ 10 + 230 * t ^ 11 + 67 * t ^ 12 + 12 * t ^ 13 + t ^ 14 := by positivity linarith have hmul : M * x * (M * (M + 1)) - (M ^ 3 - 1) = x ^ 7 - x ^ 6 + x ^ 5 + 1 := by rw [← hx2]; ring linarith /-- **Strict Global Superiority over Lehtinen (1983/1984)**: For EVERY `M > 1`, `K*(M) < min (M * √M) (2 M - 1)`. -/ theorem KStar_lt_min_lehtinen {M : ℝ} (hM : 1 < M) : KStar M < min (M * Real.sqrt M) (2 * M - 1) := lt_min (KStar_lt_M_mul_sqrt_M hM) (KStar_lt_two_M_sub_one hM) /-- **Asymptotic `2M - 2 + O(1/M)` Upper Bound**: For EVERY `M ≥ 1`, `K*(M) < 2 M - 2 + 5 / (2 (M + 1))`. -/ theorem KStar_lt_asymptotic {M : ℝ} (hM : 1 ≤ M) : KStar M < 2 * M - 2 + 5 / (2 * (M + 1)) := by unfold KStar have hMpos : 0 < M * (M + 1) := by positivity have hM1 : 0 < M + 1 := by linarith rw [div_lt_iff₀ hMpos] have hrhs_eq : (2 * M - 2 + 5 / (2 * (M + 1))) * (M * (M + 1)) - (M ^ 3 - 1) = (2 * M ^ 3 + M + 2) / 2 := by field_simp [ne_of_gt hM1]; ring have htarget : Real.sqrt ((M ^ 2 + 1) * (M ^ 4 + 1)) < (2 * M ^ 3 + M + 2) / 2 := by have hpos : 0 < (2 * M ^ 3 + M + 2) / 2 := by positivity rw [Real.sqrt_lt' hpos] set s := M - 1 have hs : 0 ≤ s := by linarith have hM_eq : M = 1 + s := by ring rw [hM_eq] have hdiff : ((2 * (1 + s) ^ 3 + (1 + s) + 2) / 2) ^ 2 - ((1 + s) ^ 2 + 1) * ((1 + s) ^ 4 + 1) = (9 + 22 * s + 21 * s ^ 2 + 8 * s ^ 3) / 4 := by ring have hgt : 0 < (9 + 22 * s + 21 * s ^ 2 + 8 * s ^ 3) / 4 := by positivity linarith linarith theorem KStar_two : KStar 2 = (7 + Real.sqrt 85) / 6 := by unfold KStar; norm_num; ring theorem KStar_two_lt : KStar 2 < 27033 / 10000 := by rw [KStar_two] have hsq : Real.sqrt 85 < 92198 / 10000 := by rw [Real.sqrt_lt' (by norm_num)]; norm_num linarith theorem KStar_three : KStar 3 = (13 + Real.sqrt 205) / 6 := by unfold KStar have h : ((3 : ℝ) ^ 2 + 1) * ((3 : ℝ) ^ 4 + 1) = 4 * 205 := by norm_num rw [h, Real.sqrt_mul (by norm_num : (0 : ℝ) ≤ 4), show Real.sqrt 4 = 2 by rw [show (4 : ℝ) = 2 ^ 2 by norm_num, Real.sqrt_sq (by norm_num)]] ring theorem KStar_three_lt : KStar 3 < 4553 / 1000 := by rw [KStar_three] have hsq : Real.sqrt 205 < 14318 / 1000 := by rw [Real.sqrt_lt' (by norm_num)]; norm_num linarith theorem KStar_five_lt : KStar 5 < 8386 / 1000 := by unfold KStar have hsq : Real.sqrt (((5 : ℝ) ^ 2 + 1) * ((5 : ℝ) ^ 4 + 1)) < 12758 / 100 := by rw [Real.sqrt_lt' (by norm_num)]; norm_num linarith theorem KStar_ten_lt : KStar 10 < 182186 / 10000 := by unfold KStar have hsq : Real.sqrt (((10 : ℝ) ^ 2 + 1) * ((10 : ℝ) ^ 4 + 1)) < 100504 / 100 := by rw [Real.sqrt_lt' (by norm_num)]; norm_num linarith /-- **Headline Corollary**: For EVERY `M > 1`, EVERY `M`-quasisymmetric `h : ℝ → ℝ`, and EVERY `(x, y) ∈ ℍ`, the optimal Beurling–Ahlfors extension strictly beats Lehtinen's `min(M √M, 2 M - 1)` AND satisfies `< 2 M - 2 + 5 / (2 (M + 1))`. -/ theorem beurlingAhlfors_beats_lehtinen {M : ℝ} (hM : 1 < M) {h : ℝ → ℝ} (hh : IsQuasisymmetric M h) (x y : ℝ) (hy : 0 < y) : baDilatation h (rStar M) x y < min (M * Real.sqrt M) (2 * M - 1) ∧ baDilatation h (rStar M) x y < 2 * M - 2 + 5 / (2 * (M + 1)) := by have hle := beurlingAhlfors_exact_bound hh x y hy exact ⟨lt_of_le_of_lt hle (KStar_lt_min_lehtinen hM), lt_of_le_of_lt hle (KStar_lt_asymptotic (le_of_lt hM))⟩ #print axioms QStar_to_KStar #print axioms polyDefect_pentagon_nonneg #print axioms baQ_le_QStar_all_xi #print axioms beurlingAhlfors_exact_bound #print axioms KStar_lt_two_M_sub_one #print axioms KStar_lt_M_mul_sqrt_M #print axioms KStar_lt_min_lehtinen #print axioms KStar_lt_asymptotic #print axioms KStar_two #print axioms KStar_two_lt #print axioms KStar_three #print axioms KStar_three_lt #print axioms beurlingAhlfors_beats_lehtinen end BeurlingAhlforsExactBound