/- Copyright (c) 2026 Arthur Collé. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -/ import Mathlib /-! # Sharp Modified Logarithmic Sobolev Constants on Asymmetric Two-Point Spaces & Biased Hypercubes This file establishes sharp, explicit two-sided bounds for the **Modified Logarithmic Sobolev Inequality (MLSI)** constant $\rho_0(p)$ of the asymmetric two-point Bernoulli space $\{0, 1\}_p$ and its exact tensorization to the $n$-dimensional biased hypercube $\{0, 1\}_p^n$, together with a complete self-contained formalization of the **Diaconis–Saloff-Coste (1996)** exact standard Log-Sobolev constant $\alpha_{\mathrm{LS}}(p)$, the **Bobkov–Tetali (2006)** lower bound $\rho_0(p) \ge 1$, the **Erbar–Maas (2012) / Mielke (2013)** entropic Ricci curvature bound $\rho_0(p) \ge 1 + 2\sqrt{p(1 - p)}$, and continuous-time exponential entropy decay. ## Main Results For $p \in (0, 1/2)$, $q = 1 - p$, and $L = \log(q / p) > 0$, define the explicit scale $$D_{3/4}(L) := 1 + L - \log\!\left(1 + \frac{3}{4} L\right)$$ and the explicit closed-form lower bound $$\rho_{\mathrm{sharp}}(p) := 1 + \frac{1 - p}{D_{3/4}(L)} + p\,D_{3/4}(L)$$ (extended symmetrically to all $p \in (0, 1)$ via $p \leftrightarrow 1 - p$, with $\rho_{\mathrm{sharp}}(1/2) = 2$). 1. **Exact Jensen-Gap Identity & Bobkov–Tetali Bound** (`dirichletLog_sub_ent_eq`, `mlsi_ge_one`): $$\mathcal{E}_{\mu_p}(f, \log f) - \operatorname{Ent}_{\mu_p}(f) = m \log\!\left(\frac{m}{a^{1 - p} b^p}\right) \ge 0, \qquad m = (1 - p)a + p b.$$ 2. **Master Second-Derivative Quadratic Factorization** (`hasDerivAt_phiRho'`): $$\Phi_\rho''(p, t) = \frac{p(1 - p)}{t^2(1 - p + p t)}\Bigl(p t^2 + (1 - \rho) t + (1 - p)\Bigr).$$ 3. **Erbar–Maas / Mielke Entropic Ricci Curvature Bound** (`mlsi_ge_erbarMaas`, `mlsi_half_ge_two`): $$\rho_0(p) \ge 1 + 2\sqrt{p(1 - p)}, \qquad \rho_0(1/2) = 2.$$ 4. **Master One-Point Reduction Criterion** (`mlsi_ge_of_onePoint_margin`): For any $D \in [1, e^{L/2}]$, positivity of the single explicit scalar margin $$F(L, D) := (e^L + D)(D + 1)\bigl(\log(D + 1) - \log(e^L + 1)\bigr) + e^L D (L + 1 - \log D) - D^2 \ge 0$$ implies $\mathcal{E}_{\mu_p}(f, \log f) \ge \bigl(1 + \frac{q}{D} + p D\bigr)\operatorname{Ent}_{\mu_p}(f)$ for all positive $f : \{0, 1\} \to (0, \infty)$. 5. **Sharp Closed-Form Logarithmic Lower Bound Strictly Beating Erbar–Maas Everywhere** (`mlsi_ge_sharp_log`, `sharp_log_gt_erbarMaas`, `sharp_log_excess_unbounded_over_erbarMaas`): At the exact critical constant $c = 3/4$ (where the $O(L^3)$ Taylor coefficient of $F(L, D_c(L))$ vanishes), we prove $F(L, D_{3/4}(L)) \ge 0$ for all $L > 0$, yielding $$\rho_0(p) \ge 1 + \frac{1 - p}{D_{3/4}(L)} + p\,D_{3/4}(L) > 1 + 2\sqrt{p(1 - p)}$$ for EVERY $p \in (0, 1) \setminus \{1/2\}$, with unbounded excess gain $(\rho_{\mathrm{sharp}}(p) - 1)/(2\sqrt{p(1-p)}) \to \infty$ as $p \to 0^+$ (nearly $300\times$ at $p = 10^{-8}$) and capturing the exact first- and second-order logarithmic asymptotics $1 + 1/\log(1/p) + \log\log(1/p)/\log^2(1/p)$. 6. **Sharp Closed-Form Upper Bounds & Complete Two-Sided Sandwich** (`mlsi_le_dsc_witness`, `dsc_witness_lt_one_add_lsi`, `mlsi_le_log_witness`, `mlsi_sharp_two_sided_sandwich`): $$\rho_{\mathrm{sharp}}(p) \le \rho_0(p) \le \min\!\left(\frac{(1 - 2p)\log((1 - p)/p)}{\log(1/(4p(1 - p)))},\; R\!\left(p, \frac{1 - p}{p\,D_{3/4}(L)}\right)\right) < 1 + \alpha_{\mathrm{LS}}(p) < 2.$$ 7. **Exact Diaconis–Saloff-Coste (1996) LSI Constant** (`diaconis_saloffCoste_lsi`, `lsi_attained_at_sq_ratio`, `full_spectral_entropy_hierarchy`): $$\alpha_{\mathrm{LS}}(p) = \frac{2(1 - 2p)}{\log((1 - p)/p)} \quad (p \ne 1/2), \qquad \alpha_{\mathrm{LS}}(1/2) = 1.$$ 8. **Exact Tensorization to the Biased Hypercube $\{0, 1\}_p^n$ & Exponential Entropy Decay** (`entropy_subadditive_hypercube`, `mlsi_tensorization_hypercube`, `hypercube_mlsi_sharp_log`, `exponential_entropy_decay`): Every two-point MLSI bound lifts with zero dimension loss to $\{0, 1\}_p^n$ for all $n \in \mathbb{N}$. -/ open Real Finset BigOperators noncomputable section namespace ModifiedLogSobolevSharpBounds /-! ## Section 1: Elementary Real & Analytic Inequalities -/ /-- Exact derivative of the Simpson upper bound on `log(b/a)`. -/ lemma hasDerivAt_simpson_log_gap (a : ℝ) (ha : 0 < a) (b : ℝ) (hb : 0 < b) : HasDerivAt (fun y => (y - a) / 6 * (1 / a + 8 / (a + y) + 1 / y) - Real.log (y / a)) ((b - a) ^ 4 / (6 * a * b ^ 2 * (a + b) ^ 2)) b := by have hab : a + b ≠ 0 := by linarith have hb0 : b ≠ 0 := ne_of_gt hb have ha0 : a ≠ 0 := ne_of_gt ha have h1 : HasDerivAt (fun y => (y - a) / 6) (1 / 6) b := (((hasDerivAt_id' b).sub_const a).div_const 6) have h2a : HasDerivAt (fun y => (8 : ℝ) / (a + y)) (-(8 : ℝ) / (a + b) ^ 2) b := by have h := (hasDerivAt_const b (8 : ℝ)).div ((hasDerivAt_id' b).const_add a) hab exact h.congr_deriv (by ring) have h2b : HasDerivAt (fun y => (1 : ℝ) / y) (-(1 : ℝ) / b ^ 2) b := by have h := (hasDerivAt_const b (1 : ℝ)).div (hasDerivAt_id' b) hb0 exact h.congr_deriv (by ring) have h2 : HasDerivAt (fun y => 1 / a + 8 / (a + y) + 1 / y) (-(8 : ℝ) / (a + b) ^ 2 + -(1 : ℝ) / b ^ 2) b := by have h := ((hasDerivAt_const b (1 / a)).add h2a).add h2b exact h.congr_deriv (by ring) have hprod := h1.mul h2 have hlog : HasDerivAt (fun y => Real.log (y / a)) (1 / b) b := by have hdiv : HasDerivAt (fun y => y / a) (1 / a) b := (hasDerivAt_id' b).div_const a have hba : b / a ≠ 0 := div_ne_zero hb0 ha0 exact (hdiv.log hba).congr_deriv (by field_simp) exact (hprod.sub hlog).congr_deriv (by field_simp; ring) /-- Simpson's rule upper bound on `log(b / a)` for `0 < a ≤ b`. -/ theorem log_div_le_simpson {a b : ℝ} (ha : 0 < a) (hab : a ≤ b) : Real.log (b / a) ≤ (b - a) / 6 * (1 / a + 8 / (a + b) + 1 / b) := by set g : ℝ → ℝ := fun y => (y - a) / 6 * (1 / a + 8 / (a + y) + 1 / y) - Real.log (y / a) have hmono : MonotoneOn g (Set.Ici a) := by apply monotoneOn_of_deriv_nonneg (convex_Ici a) · intro y hy have hy0 : 0 < y := lt_of_lt_of_le ha hy exact (hasDerivAt_simpson_log_gap a ha y hy0).continuousAt.continuousWithinAt · intro y hy rw [interior_Ici] at hy have hy0 : 0 < y := lt_trans ha hy exact (hasDerivAt_simpson_log_gap a ha y hy0).differentiableAt.differentiableWithinAt · intro y hy rw [interior_Ici] at hy have hy0 : 0 < y := lt_trans ha hy rw [(hasDerivAt_simpson_log_gap a ha y hy0).deriv] positivity have h0 : g a ≤ g b := hmono Set.self_mem_Ici hab hab have hga : g a = 0 := by simp [g, div_self (ne_of_gt ha)] simp only [g] at h0 hga linarith /-- Specialization of Simpson's rule to `log D` for `1 ≤ D`. -/ theorem log_le_simpson_one {D : ℝ} (hD : 1 ≤ D) : Real.log D ≤ (D - 1) / 6 * (1 + 8 / (D + 1) + 1 / D) := by have h := log_div_le_simpson (a := 1) (b := D) zero_lt_one hD simpa [div_one, add_comm] using h /-- Padé `[2/1]` upper bound: `log(1 + x) ≤ x (6 + x) / (6 + 4 x)` for all `x ≥ 0`. -/ theorem log_one_add_le_pade21 {x : ℝ} (hx : 0 ≤ x) : Real.log (1 + x) ≤ x * (6 + x) / (6 + 4 * x) := by set g : ℝ → ℝ := fun t => t * (6 + t) / (6 + 4 * t) - Real.log (1 + t) have hderiv : ∀ t : ℝ, 0 ≤ t → HasDerivAt g (t ^ 3 / ((1 + t) * (3 + 2 * t) ^ 2)) t := by intro t ht0 have h1t : 1 + t ≠ 0 := by linarith have h6t : 6 + 4 * t ≠ 0 := by linarith have hnum : HasDerivAt (fun s => s * (6 + s)) (6 + 2 * t) t := ((hasDerivAt_id' t).mul ((hasDerivAt_id' t).const_add 6)).congr_deriv (by ring) have hden : HasDerivAt (fun s => 6 + 4 * s) 4 t := (((hasDerivAt_id' t).const_mul 4).const_add 6).congr_deriv (by ring) have hrat := hnum.div hden h6t have hlog : HasDerivAt (fun s => Real.log (1 + s)) (1 / (1 + t)) t := (((hasDerivAt_id' t).const_add 1).log h1t).congr_deriv (by ring) exact (hrat.sub hlog).congr_deriv (by field_simp; ring) have hmono : MonotoneOn g (Set.Ici (0 : ℝ)) := by apply monotoneOn_of_deriv_nonneg (convex_Ici 0) · intro t ht; exact (hderiv t ht).continuousAt.continuousWithinAt · intro t ht; rw [interior_Ici] at ht exact (hderiv t (le_of_lt ht)).differentiableAt.differentiableWithinAt · intro t ht; rw [interior_Ici] at ht rw [(hderiv t (le_of_lt ht)).deriv] have ht0 : 0 < t := ht positivity have h0 : g 0 ≤ g x := hmono Set.self_mem_Ici hx hx have hg0 : g 0 = 0 := by simp [g] simp only [g] at h0 hg0 linarith /-- Padé `[2/2]` lower bound: `x (6 + 3 x) / (6 + 6 x + x^2) ≤ log(1 + x)` for all `x ≥ 0`. -/ theorem pade22_le_log_one_add {x : ℝ} (hx : 0 ≤ x) : x * (6 + 3 * x) / (6 + 6 * x + x ^ 2) ≤ Real.log (1 + x) := by set g : ℝ → ℝ := fun t => Real.log (1 + t) - t * (6 + 3 * t) / (6 + 6 * t + t ^ 2) have hderiv : ∀ t : ℝ, 0 ≤ t → HasDerivAt g (t ^ 4 / ((1 + t) * (6 + 6 * t + t ^ 2) ^ 2)) t := by intro t ht0 have h1t : 1 + t ≠ 0 := by linarith have hd : 6 + 6 * t + t ^ 2 ≠ 0 := by nlinarith have hnum : HasDerivAt (fun s => s * (6 + 3 * s)) (6 + 6 * t) t := ((hasDerivAt_id' t).mul (((hasDerivAt_id' t).const_mul 3).const_add 6)).congr_deriv (by ring) have hden : HasDerivAt (fun s => 6 + 6 * s + s ^ 2) (6 + 2 * t) t := ((((hasDerivAt_id' t).const_mul 6).const_add 6).add ((hasDerivAt_id' t).pow 2)).congr_deriv (by ring) have hrat := hnum.div hden hd have hlog : HasDerivAt (fun s => Real.log (1 + s)) (1 / (1 + t)) t := (((hasDerivAt_id' t).const_add 1).log h1t).congr_deriv (by ring) exact (hlog.sub hrat).congr_deriv (by field_simp; ring) have hmono : MonotoneOn g (Set.Ici (0 : ℝ)) := by apply monotoneOn_of_deriv_nonneg (convex_Ici 0) · intro t ht; exact (hderiv t ht).continuousAt.continuousWithinAt · intro t ht; rw [interior_Ici] at ht exact (hderiv t (le_of_lt ht)).differentiableAt.differentiableWithinAt · intro t ht; rw [interior_Ici] at ht rw [(hderiv t (le_of_lt ht)).deriv] have ht0 : 0 < t := ht positivity have h0 : g 0 ≤ g x := hmono Set.self_mem_Ici hx hx have hg0 : g 0 = 0 := by simp [g] simp only [g] at h0 hg0 linarith /-- Classical Padé `[1/1]` lower bound: `2 x / (2 + x) ≤ log(1 + x)` for all `x ≥ 0`. -/ theorem two_mul_div_two_add_le_log_one_add {x : ℝ} (hx : 0 ≤ x) : 2 * x / (2 + x) ≤ Real.log (1 + x) := by have h := pade22_le_log_one_add hx have h1 : 2 * x / (2 + x) ≤ x * (6 + 3 * x) / (6 + 6 * x + x ^ 2) := by have hd1 : 0 < 2 + x := by linarith have hd2 : 0 < 6 + 6 * x + x ^ 2 := by nlinarith rw [div_le_div_iff₀ hd1 hd2] nlinarith linarith /-- Strict Padé `[1/1]` lower bound on `log r`: `2 (r - 1) / (r + 1) < log r` for `1 < r`. -/ theorem two_sub_div_add_lt_log {r : ℝ} (hr : 1 < r) : 2 * (r - 1) / (r + 1) < Real.log r := by set x := r - 1 have hx : 0 < x := by linarith have h1 : Real.log r = Real.log (1 + x) := by simp [x] rw [h1] have hp := pade22_le_log_one_add (le_of_lt hx) have hstrict : 2 * x / (2 + x) < x * (6 + 3 * x) / (6 + 6 * x + x ^ 2) := by have hd1 : 0 < 2 + x := by linarith have hd2 : 0 < 6 + 6 * x + x ^ 2 := by nlinarith rw [div_lt_div_iff₀ hd1 hd2] nlinarith [sq_pos_of_pos hx] have hrew : 2 * (r - 1) / (r + 1) = 2 * x / (2 + x) := by simp only [x]; congr 1; ring linarith /-- Helper: `HasDerivAt (fun s => Real.exp (-s)) (-Real.exp (-t)) t`. -/ lemma hasDerivAt_exp_neg (t : ℝ) : HasDerivAt (fun s => Real.exp (-s)) (-Real.exp (-t)) t := by have h1 : HasDerivAt (fun s => -s) (-1) t := (hasDerivAt_id' t).neg exact (h1.exp).congr_deriv (by ring) /-- Padé `[2/3]` upper bound on `exp L` for `0 ≤ L ≤ 11 / 5`. -/ theorem exp_le_pade23 {L : ℝ} (hL0 : 0 ≤ L) (hL1 : L ≤ 11 / 5) : Real.exp L ≤ (60 + 24 * L + 3 * L ^ 2) / (60 - 36 * L + 9 * L ^ 2 - L ^ 3) := by have hden_pos : ∀ t : ℝ, 0 ≤ t → t ≤ 11 / 5 → 0 < 60 - 36 * t + 9 * t ^ 2 - t ^ 3 := by intro t ht0 ht1 nlinarith [sq_nonneg (t - 2), sq_nonneg t] set g : ℝ → ℝ := fun t => (60 + 24 * t + 3 * t ^ 2) / (60 - 36 * t + 9 * t ^ 2 - t ^ 3) * Real.exp (-t) have hderiv : ∀ t : ℝ, 0 ≤ t → t ≤ 11 / 5 → HasDerivAt g (3 * t ^ 5 * Real.exp (-t) / (60 - 36 * t + 9 * t ^ 2 - t ^ 3) ^ 2) t := by intro t ht0 ht1 have hd : 60 - 36 * t + 9 * t ^ 2 - t ^ 3 ≠ 0 := ne_of_gt (hden_pos t ht0 ht1) have hnum : HasDerivAt (fun s => 60 + 24 * s + 3 * s ^ 2) (24 + 6 * t) t := ((((hasDerivAt_id' t).const_mul 24).const_add 60).add (((hasDerivAt_id' t).pow 2).const_mul 3)).congr_deriv (by ring) have hden : HasDerivAt (fun s => 60 - 36 * s + 9 * s ^ 2 - s ^ 3) (-36 + 18 * t - 3 * t ^ 2) t := (((((hasDerivAt_const t (60 : ℝ)).sub ((hasDerivAt_id' t).const_mul 36)).add (((hasDerivAt_id' t).pow 2).const_mul 9)).sub ((hasDerivAt_id' t).pow 3))).congr_deriv (by ring) have hrat : HasDerivAt (fun s => (60 + 24 * s + 3 * s ^ 2) / (60 - 36 * s + 9 * s ^ 2 - s ^ 3)) (((24 + 6 * t) * (60 - 36 * t + 9 * t ^ 2 - t ^ 3) - (60 + 24 * t + 3 * t ^ 2) * (-36 + 18 * t - 3 * t ^ 2)) / (60 - 36 * t + 9 * t ^ 2 - t ^ 3) ^ 2) t := hnum.div hden hd exact (hrat.mul (hasDerivAt_exp_neg t)).congr_deriv (by field_simp; ring) have hmono : MonotoneOn g (Set.Icc (0 : ℝ) (11 / 5)) := by apply monotoneOn_of_deriv_nonneg (convex_Icc 0 (11 / 5)) · intro t ht; exact (hderiv t ht.1 ht.2).continuousAt.continuousWithinAt · intro t ht; rw [interior_Icc] at ht exact (hderiv t (le_of_lt ht.1) (le_of_lt ht.2)).differentiableAt.differentiableWithinAt · intro t ht; rw [interior_Icc] at ht rw [(hderiv t (le_of_lt ht.1) (le_of_lt ht.2)).deriv] have ht0 : 0 < t := ht.1 have hd0 : 0 < 60 - 36 * t + 9 * t ^ 2 - t ^ 3 := hden_pos t (le_of_lt ht.1) (le_of_lt ht.2) positivity have h0 : g 0 ≤ g L := hmono ⟨le_rfl, by norm_num⟩ ⟨hL0, hL1⟩ hL0 have hg0 : g 0 = 1 := by simp [g] rw [hg0] at h0 have hexp_pos : 0 < Real.exp L := Real.exp_pos L have hmul := mul_le_mul_of_nonneg_right h0 (le_of_lt hexp_pos) simp only [g, one_mul, mul_assoc, ← Real.exp_add, neg_add_cancel, Real.exp_zero, mul_one] at hmul exact hmul /-- Degree-6 Taylor lower bound on `exp L` for `L ≥ 0`. -/ theorem taylor6_le_exp {L : ℝ} (hL : 0 ≤ L) : 1 + L + L ^ 2 / 2 + L ^ 3 / 6 + L ^ 4 / 24 + L ^ 5 / 120 + L ^ 6 / 720 ≤ Real.exp L := by have h := Real.sum_le_exp_of_nonneg hL 7 simp only [Finset.sum_range_succ, Finset.range_zero, Finset.sum_empty, Nat.factorial] at h linarith /-- Degree-4 Taylor lower bound on `exp L` for `L ≥ 0`. -/ theorem taylor4_le_exp {L : ℝ} (hL : 0 ≤ L) : 1 + L + L ^ 2 / 2 + L ^ 3 / 6 + L ^ 4 / 24 ≤ Real.exp L := by have h := Real.sum_le_exp_of_nonneg hL 5 simp only [Finset.sum_range_succ, Finset.range_zero, Finset.sum_empty, Nat.factorial] at h linarith /-- Degree-3 Taylor lower bound on `exp L` for `L ≥ 0`. -/ theorem taylor3_le_exp {L : ℝ} (hL : 0 ≤ L) : 1 + L + L ^ 2 / 2 + L ^ 3 / 6 ≤ Real.exp L := by have h := Real.sum_le_exp_of_nonneg hL 4 simp only [Finset.sum_range_succ, Finset.range_zero, Finset.sum_empty, Nat.factorial] at h linarith /-- Alternating degree-4 Taylor upper bound on `exp (-x)` for `x ≥ 0`. -/ theorem exp_neg_le_taylor4 {x : ℝ} (hx : 0 ≤ x) : Real.exp (-x) ≤ 1 - x + x ^ 2 / 2 - x ^ 3 / 6 + x ^ 4 / 24 := by set g0 : ℝ → ℝ := fun s => 1 - s + s ^ 2 / 2 - s ^ 3 / 6 + s ^ 4 / 24 - Real.exp (-s) set g1 : ℝ → ℝ := fun s => -1 + s - s ^ 2 / 2 + s ^ 3 / 6 + Real.exp (-s) set g2 : ℝ → ℝ := fun s => 1 - s + s ^ 2 / 2 - Real.exp (-s) set g3 : ℝ → ℝ := fun s => -1 + s + Real.exp (-s) have hd3 : ∀ s, HasDerivAt g3 (1 - Real.exp (-s)) s := fun s => (((hasDerivAt_const s (-1 : ℝ)).add (hasDerivAt_id' s)).add (hasDerivAt_exp_neg s)).congr_deriv (by ring) have hd2 : ∀ s, HasDerivAt g2 (g3 s) s := fun s => ((((hasDerivAt_const s (1 : ℝ)).sub (hasDerivAt_id' s)).add (((hasDerivAt_id' s).pow 2).div_const 2)).sub (hasDerivAt_exp_neg s)).congr_deriv (by simp [g3]) have hd1 : ∀ s, HasDerivAt g1 (g2 s) s := fun s => (((((hasDerivAt_const s (-1 : ℝ)).add (hasDerivAt_id' s)).sub (((hasDerivAt_id' s).pow 2).div_const 2)).add (((hasDerivAt_id' s).pow 3).div_const 6)).add (hasDerivAt_exp_neg s)).congr_deriv (by simp [g2]; ring) have hd0 : ∀ s, HasDerivAt g0 (g1 s) s := fun s => ((((((hasDerivAt_const s (1 : ℝ)).sub (hasDerivAt_id' s)).add (((hasDerivAt_id' s).pow 2).div_const 2)).sub (((hasDerivAt_id' s).pow 3).div_const 6)).add (((hasDerivAt_id' s).pow 4).div_const 24)).sub (hasDerivAt_exp_neg s)).congr_deriv (by simp [g1]; ring) have hg3 : ∀ s ≥ 0, 0 ≤ g3 s := fun s _ => by simp [g3]; linarith [Real.add_one_le_exp (-s)] have hg2 : ∀ s ≥ 0, 0 ≤ g2 s := fun s hs => by have hm : MonotoneOn g2 (Set.Ici 0) := monotoneOn_of_deriv_nonneg (convex_Ici 0) (fun r _ => (hd2 r).continuousAt.continuousWithinAt) (fun r _ => (hd2 r).differentiableAt.differentiableWithinAt) (fun r hr => by rw [interior_Ici] at hr; rw [(hd2 r).deriv]; exact hg3 r (le_of_lt hr)) have h0 := hm Set.self_mem_Ici hs hs simpa [g2] using h0 have hg1 : ∀ s ≥ 0, 0 ≤ g1 s := fun s hs => by have hm : MonotoneOn g1 (Set.Ici 0) := monotoneOn_of_deriv_nonneg (convex_Ici 0) (fun r _ => (hd1 r).continuousAt.continuousWithinAt) (fun r _ => (hd1 r).differentiableAt.differentiableWithinAt) (fun r hr => by rw [interior_Ici] at hr; rw [(hd1 r).deriv]; exact hg2 r (le_of_lt hr)) have h0 := hm Set.self_mem_Ici hs hs simpa [g1] using h0 have hm0 : MonotoneOn g0 (Set.Ici 0) := monotoneOn_of_deriv_nonneg (convex_Ici 0) (fun r _ => (hd0 r).continuousAt.continuousWithinAt) (fun r _ => (hd0 r).differentiableAt.differentiableWithinAt) (fun r hr => by rw [interior_Ici] at hr; rw [(hd0 r).deriv]; exact hg1 r (le_of_lt hr)) have h0 := hm0 Set.self_mem_Ici hx hx simp only [g0, neg_zero, Real.exp_zero] at h0 norm_num at h0 linarith /-- Hyperbolic Cusa–Huygens auxiliary: `u cosh u + 2 u - 3 sinh u > 0` for all `u > 0`. -/ theorem hyperbolic_cusa_aux {u : ℝ} (hu : 0 < u) : 0 < u * Real.cosh u + 2 * u - 3 * Real.sinh u := by set f3 : ℝ → ℝ := fun x => x * Real.cosh x - Real.sinh x set f2 : ℝ → ℝ := fun x => x * Real.sinh x - 2 * Real.cosh x + 2 set f1 : ℝ → ℝ := fun x => x * Real.cosh x + 2 * x - 3 * Real.sinh x have hf3_deriv : ∀ x : ℝ, HasDerivAt f3 (x * Real.sinh x) x := fun x => (((hasDerivAt_id' x).mul (Real.hasDerivAt_cosh x)).sub (Real.hasDerivAt_sinh x)).congr_deriv (by ring) have hf2_deriv : ∀ x : ℝ, HasDerivAt f2 (f3 x) x := fun x => ((((hasDerivAt_id' x).mul (Real.hasDerivAt_sinh x)).sub ((Real.hasDerivAt_cosh x).const_mul 2)).add_const 2).congr_deriv (by simp [f3]; ring) have hf1_deriv : ∀ x : ℝ, HasDerivAt f1 (f2 x) x := fun x => ((((hasDerivAt_id' x).mul (Real.hasDerivAt_cosh x)).add ((hasDerivAt_id' x).const_mul 2)).sub ((Real.hasDerivAt_sinh x).const_mul 3)).congr_deriv (by simp [f2]; ring) have hf3_pos : ∀ x : ℝ, 0 < x → 0 < f3 x := by intro x hx have hsm : StrictMonoOn f3 (Set.Ici 0) := by apply strictMonoOn_of_deriv_pos (convex_Ici 0) · exact fun y _ => (hf3_deriv y).continuousAt.continuousWithinAt · intro y hy; rw [interior_Ici] at hy rw [(hf3_deriv y).deriv] exact mul_pos hy (Real.sinh_pos_iff.mpr hy) have h0 : f3 0 = 0 := by simp [f3] rw [← h0]; exact hsm Set.self_mem_Ici (le_of_lt hx) hx have hf2_pos : ∀ x : ℝ, 0 < x → 0 < f2 x := by intro x hx have hsm : StrictMonoOn f2 (Set.Ici 0) := by apply strictMonoOn_of_deriv_pos (convex_Ici 0) · exact fun y _ => (hf2_deriv y).continuousAt.continuousWithinAt · intro y hy; rw [interior_Ici] at hy rw [(hf2_deriv y).deriv]; exact hf3_pos y hy have h0 : f2 0 = 0 := by simp [f2] rw [← h0]; exact hsm Set.self_mem_Ici (le_of_lt hx) hx have hf1_sm : StrictMonoOn f1 (Set.Ici 0) := by apply strictMonoOn_of_deriv_pos (convex_Ici 0) · exact fun y _ => (hf1_deriv y).continuousAt.continuousWithinAt · intro y hy; rw [interior_Ici] at hy rw [(hf1_deriv y).deriv]; exact hf2_pos y hy have h0 : f1 0 = 0 := by simp [f1] rw [← h0] exact hf1_sm Set.self_mem_Ici (le_of_lt hu) hu /-- Hyperbolic Cusa–Huygens inequality: `t^3 cosh t < sinh^3 t` for all `t > 0`. -/ theorem cube_mul_cosh_lt_sinh_cube {t : ℝ} (ht : 0 < t) : t ^ 3 * Real.cosh t < Real.sinh t ^ 3 := by set h : ℝ → ℝ := fun x => 3 * Real.log (Real.sinh x) - 3 * Real.log x - Real.log (Real.cosh x) have hderiv : ∀ x : ℝ, 0 < x → HasDerivAt h ((2 * x * Real.cosh (2 * x) + 2 * (2 * x) - 3 * Real.sinh (2 * x)) / (2 * x * Real.sinh x * Real.cosh x)) x := by intro x hx have hs : Real.sinh x ≠ 0 := ne_of_gt (Real.sinh_pos_iff.mpr hx) have hc : Real.cosh x ≠ 0 := ne_of_gt (Real.cosh_pos x) have hx0 : x ≠ 0 := ne_of_gt hx have h1 := ((Real.hasDerivAt_sinh x).log hs).const_mul 3 have h2 := ((hasDerivAt_id' x).log hx0).const_mul 3 have h3 := (Real.hasDerivAt_cosh x).log hc refine ((h1.sub h2).sub h3).congr_deriv ?_ have hch2 : Real.cosh (2 * x) = Real.cosh x ^ 2 + Real.sinh x ^ 2 := by rw [two_mul, Real.cosh_add]; ring have hsh2 : Real.sinh (2 * x) = 2 * Real.sinh x * Real.cosh x := by rw [two_mul, Real.sinh_add]; ring have hid : Real.cosh x ^ 2 - Real.sinh x ^ 2 = 1 := Real.cosh_sq_sub_sinh_sq x rw [hch2, hsh2] field_simp nlinarith [hid] have hsm : StrictMonoOn h (Set.Ioi 0) := by apply strictMonoOn_of_deriv_pos (convex_Ioi 0) · intro x hx; exact (hderiv x hx).continuousAt.continuousWithinAt · intro x hx; rw [interior_Ioi] at hx have hx0 : 0 < x := hx rw [(hderiv x hx0).deriv] have hnum := hyperbolic_cusa_aux (by linarith : 0 < 2 * x) have hs : 0 < Real.sinh x := Real.sinh_pos_iff.mpr hx0 have hc : 0 < Real.cosh x := Real.cosh_pos x positivity have hsmall : ∀ x : ℝ, 0 < x → x ≤ 1 → x ^ 3 * Real.cosh x < Real.sinh x ^ 3 := by intro x hx hx1 have hsh : x + x ^ 3 / 6 ≤ Real.sinh x := by have he1 := taylor4_le_exp (le_of_lt hx) have he2 := exp_neg_le_taylor4 (le_of_lt hx) rw [Real.sinh_eq] linarith have hch : Real.cosh x ≤ 1 + x ^ 2 / 2 + x ^ 4 / 16 := by have hexp_pos : Real.exp x ≤ (60 + 24 * x + 3 * x ^ 2) / (60 - 36 * x + 9 * x ^ 2 - x ^ 3) := exp_le_pade23 (le_of_lt hx) (by linarith) have hexp_neg := exp_neg_le_taylor4 (le_of_lt hx) have hexp_pos2 : Real.exp x ≤ 1 + x + x ^ 2 / 2 + x ^ 3 / 6 + x ^ 4 / 12 := by have hd : 0 < 60 - 36 * x + 9 * x ^ 2 - x ^ 3 := by nlinarith [sq_nonneg (x - 1)] have hrat : (60 + 24 * x + 3 * x ^ 2) / (60 - 36 * x + 9 * x ^ 2 - x ^ 3) ≤ 1 + x + x ^ 2 / 2 + x ^ 3 / 6 + x ^ 4 / 12 := by rw [div_le_iff₀ hd] have : (1 + x + x ^ 2 / 2 + x ^ 3 / 6 + x ^ 4 / 12) * (60 - 36 * x + 9 * x ^ 2 - x ^ 3) - (60 + 24 * x + 3 * x ^ 2) = x ^ 4 * (30 - 24 * x + 7 * x ^ 2 - x ^ 3) / 12 := by ring have hpoly : 0 ≤ 30 - 24 * x + 7 * x ^ 2 - x ^ 3 := by have hx2 : x ^ 2 ≤ 1 := by nlinarith have hx3 : x ^ 3 ≤ 1 := by nlinarith nlinarith [sq_nonneg x] have hprod : 0 ≤ x ^ 4 * (30 - 24 * x + 7 * x ^ 2 - x ^ 3) / 12 := by positivity linarith linarith rw [Real.cosh_eq] linarith have hpow : (x + x ^ 3 / 6) ^ 3 ≤ Real.sinh x ^ 3 := pow_le_pow_left₀ (by positivity) hsh 3 have hgap : x ^ 3 * (1 + x ^ 2 / 2 + x ^ 4 / 16) < (x + x ^ 3 / 6) ^ 3 := by have : (x + x ^ 3 / 6) ^ 3 - x ^ 3 * (1 + x ^ 2 / 2 + x ^ 4 / 16) = x ^ 7 / 48 + x ^ 9 / 216 := by ring have hpos : 0 < x ^ 7 / 48 + x ^ 9 / 216 := by positivity linarith nlinarith [pow_pos hx 3] by_cases ht1 : t ≤ 1 · exact hsmall t ht ht1 · push Not at ht1 have h1 := hsmall 1 zero_lt_one le_rfl have hh1 : 0 < h 1 := by have hs : 0 < Real.sinh 1 := Real.sinh_pos_iff.mpr zero_lt_one have hc : 0 < Real.cosh 1 := Real.cosh_pos 1 have hlog : Real.log (1 ^ 3 * Real.cosh 1) < Real.log (Real.sinh 1 ^ 3) := Real.log_lt_log (by positivity) h1 rw [Real.log_mul (by positivity) (ne_of_gt hc), Real.log_pow, Real.log_pow] at hlog simp only [h]; push_cast at hlog; linarith have hht : h 1 < h t := hsm (Set.mem_Ioi.mpr zero_lt_one) (Set.mem_Ioi.mpr ht) ht1 have hhpos : 0 < h t := lt_trans hh1 hht have hs : 0 < Real.sinh t := Real.sinh_pos_iff.mpr ht have hc : 0 < Real.cosh t := Real.cosh_pos t have hlog : Real.log (t ^ 3 * Real.cosh t) < Real.log (Real.sinh t ^ 3) := by rw [Real.log_mul (by positivity) (ne_of_gt hc), Real.log_pow, Real.log_pow] simp only [h] at hhpos; push_cast; linarith exact (Real.log_lt_log_iff (by positivity) (by positivity)).mp hlog /-- Key hyperbolic inequality powering `R(p, q/p) < 1 + α_LS(p)`: `t^2 sinh t / (t cosh t + sinh t) < log(cosh t)` for all `t > 0`. -/ theorem sq_sinh_div_lt_log_cosh {t : ℝ} (ht : 0 < t) : t ^ 2 * Real.sinh t / (t * Real.cosh t + Real.sinh t) < Real.log (Real.cosh t) := by set g : ℝ → ℝ := fun x => Real.log (Real.cosh x) - x ^ 2 * Real.sinh x / (x * Real.cosh x + Real.sinh x) have hden_pos : ∀ x : ℝ, 0 < x → 0 < x * Real.cosh x + Real.sinh x := by intro x hx have hc := Real.cosh_pos x have hs := Real.sinh_pos_iff.mpr hx positivity have hderiv : ∀ x : ℝ, 0 < x → HasDerivAt g ((Real.sinh x ^ 3 - x ^ 3 * Real.cosh x) / (Real.cosh x * (x * Real.cosh x + Real.sinh x) ^ 2)) x := by intro x hx have hc : Real.cosh x ≠ 0 := ne_of_gt (Real.cosh_pos x) have hd : x * Real.cosh x + Real.sinh x ≠ 0 := ne_of_gt (hden_pos x hx) have hlog := (Real.hasDerivAt_cosh x).log hc have hsq : HasDerivAt (fun s => s ^ 2) (2 * x) x := ((hasDerivAt_id' x).pow 2).congr_deriv (by ring) have hnum : HasDerivAt (fun s => s ^ 2 * Real.sinh s) (2 * x * Real.sinh x + x ^ 2 * Real.cosh x) x := (hsq.mul (Real.hasDerivAt_sinh x)).congr_deriv (by ring) have hden : HasDerivAt (fun s => s * Real.cosh s + Real.sinh s) (2 * Real.cosh x + x * Real.sinh x) x := (((hasDerivAt_id' x).mul (Real.hasDerivAt_cosh x)).add (Real.hasDerivAt_sinh x)).congr_deriv (by ring) have hrat := hnum.div hden hd refine (hlog.sub hrat).congr_deriv ?_ field_simp have hdiff : Real.sinh x * (Real.cosh x * x + Real.sinh x) ^ 2 - Real.cosh x * x * ((Real.sinh x * 2 + Real.cosh x * x) * (Real.cosh x * x + Real.sinh x) - Real.sinh x * x * (Real.cosh x * 2 + Real.sinh x * x)) = Real.sinh x ^ 3 - Real.cosh x * x ^ 3 * (Real.cosh x ^ 2 - Real.sinh x ^ 2) := by ring rw [hdiff, Real.cosh_sq_sub_sinh_sq, mul_one] have hsm : StrictMonoOn g (Set.Ioi 0) := by apply strictMonoOn_of_deriv_pos (convex_Ioi 0) · intro x hx; exact (hderiv x hx).continuousAt.continuousWithinAt · intro x hx; rw [interior_Ioi] at hx have hx0 : 0 < x := hx rw [(hderiv x hx0).deriv] have hnum : 0 < Real.sinh x ^ 3 - x ^ 3 * Real.cosh x := sub_pos.mpr (cube_mul_cosh_lt_sinh_cube hx0) have hc := Real.cosh_pos x have hd := hden_pos x hx0 positivity have hhalf_nn : 0 ≤ g (t / 2) := by by_contra hneg push Not at hneg set ε := -g (t / 2) have hε : 0 < ε := by linarith set y := min (t / 4) (Real.sqrt (ε / 2)) have hy : 0 < y := lt_min (by linarith) (Real.sqrt_pos.mpr (by linarith)) have hyt : y < t / 2 := lt_of_le_of_lt (min_le_left _ _) (by linarith) have hlc : 0 ≤ Real.log (Real.cosh y) := Real.log_nonneg (Real.one_le_cosh y) have hfrac : y ^ 2 * Real.sinh y / (y * Real.cosh y + Real.sinh y) ≤ y ^ 2 := by have hd := hden_pos y hy rw [div_le_iff₀ hd] have hc := Real.cosh_pos y have hy3c : 0 ≤ y ^ 2 * (y * Real.cosh y) := by positivity linarith have hy2 : y ^ 2 ≤ ε / 2 := by calc y ^ 2 ≤ (Real.sqrt (ε / 2)) ^ 2 := pow_le_pow_left₀ (le_of_lt hy) (min_le_right _ _) 2 _ = ε / 2 := Real.sq_sqrt (by linarith) have hgy : -ε < g y := by simp only [g]; linarith have hlt := hsm (Set.mem_Ioi.mpr hy) (Set.mem_Ioi.mpr (by linarith : (0 : ℝ) < t / 2)) hyt linarith have hhalf : g (t / 2) < g t := hsm (Set.mem_Ioi.mpr (by linarith)) (Set.mem_Ioi.mpr ht) (by linarith) have hpos : 0 < g t := lt_of_le_of_lt hhalf_nn hhalf simp only [g] at hpos linarith /-! ## Section 2: Two-Point Bernoulli Space `{0, 1}_p` & Fundamental Functionals -/ /-- Mean of a two-point function `(a, b)` under `Ber(p)`. -/ def bernoulliMean (p a b : ℝ) : ℝ := (1 - p) * a + p * b /-- Variance (and quadratic Dirichlet form) of `(a, b)` under `Ber(p)`. -/ def bernoulliVar (p a b : ℝ) : ℝ := p * (1 - p) * (b - a) ^ 2 /-- Entropy functional `Ent_{μ_p}(a, b) = (1 - p) a log a + p b log b - m log m`. -/ def bernoulliEnt (p a b : ℝ) : ℝ := (1 - p) * a * Real.log a + p * b * Real.log b - bernoulliMean p a b * Real.log (bernoulliMean p a b) /-- Modified Dirichlet form `E_{μ_p}(f, log f) = p (1 - p) (b - a) (log b - log a)`. -/ def bernoulliDirichletLog (p a b : ℝ) : ℝ := p * (1 - p) * (b - a) * (Real.log b - Real.log a) /-- Standard Dirichlet form `2 E_{μ_p}(√f, √f) = 2 p (1 - p) (√b - √a)^2`. -/ def bernoulliDirichletSqrt (p a b : ℝ) : ℝ := 2 * p * (1 - p) * (Real.sqrt b - Real.sqrt a) ^ 2 /-- Positivity of the Bernoulli mean for positive values. -/ lemma bernoulliMean_pos {p a b : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ha : 0 < a) (hb : 0 < b) : 0 < bernoulliMean p a b := by unfold bernoulliMean; nlinarith /-- Symmetry `p ↔ 1 - p`, `a ↔ b` of the Bernoulli mean. -/ lemma bernoulliMean_symm (p a b : ℝ) : bernoulliMean (1 - p) b a = bernoulliMean p a b := by unfold bernoulliMean; ring /-- Symmetry `p ↔ 1 - p`, `a ↔ b` of entropy. -/ lemma bernoulliEnt_symm (p a b : ℝ) : bernoulliEnt (1 - p) b a = bernoulliEnt p a b := by unfold bernoulliEnt; rw [bernoulliMean_symm]; ring /-- Symmetry `p ↔ 1 - p`, `a ↔ b` of the modified Dirichlet form. -/ lemma bernoulliDirichletLog_symm (p a b : ℝ) : bernoulliDirichletLog (1 - p) b a = bernoulliDirichletLog p a b := by unfold bernoulliDirichletLog; ring /-- Symmetry `p ↔ 1 - p`, `a ↔ b` of the standard square-root Dirichlet form. -/ lemma bernoulliDirichletSqrt_symm (p a b : ℝ) : bernoulliDirichletSqrt (1 - p) b a = bernoulliDirichletSqrt p a b := by unfold bernoulliDirichletSqrt; ring /-- Scale homogeneity of `bernoulliEnt` under `(a, b) ↦ (c a, c b)` for `c > 0`. -/ lemma bernoulliEnt_scale {p a b c : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) : bernoulliEnt p (c * a) (c * b) = c * bernoulliEnt p a b := by have hm : 0 < bernoulliMean p a b := bernoulliMean_pos hp0 hp1 ha hb have hmc : bernoulliMean p (c * a) (c * b) = c * bernoulliMean p a b := by unfold bernoulliMean; ring unfold bernoulliEnt rw [hmc, Real.log_mul (ne_of_gt hc) (ne_of_gt ha), Real.log_mul (ne_of_gt hc) (ne_of_gt hb), Real.log_mul (ne_of_gt hc) (ne_of_gt hm)] unfold bernoulliMean ring /-- Scale homogeneity of `bernoulliDirichletLog` under `(a, b) ↦ (c a, c b)` for `c > 0`. -/ lemma bernoulliDirichletLog_scale {p a b c : ℝ} (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) : bernoulliDirichletLog p (c * a) (c * b) = c * bernoulliDirichletLog p a b := by unfold bernoulliDirichletLog rw [Real.log_mul (ne_of_gt hc) (ne_of_gt ha), Real.log_mul (ne_of_gt hc) (ne_of_gt hb)] ring /-- Scale homogeneity of `bernoulliDirichletSqrt` under `(a, b) ↦ (c a, c b)` for `c > 0`. -/ lemma bernoulliDirichletSqrt_scale {p a b c : ℝ} (hc : 0 ≤ c) : bernoulliDirichletSqrt p (c * a) (c * b) = c * bernoulliDirichletSqrt p a b := by unfold bernoulliDirichletSqrt rw [Real.sqrt_mul hc a, Real.sqrt_mul hc b] have : (Real.sqrt c * Real.sqrt b - Real.sqrt c * Real.sqrt a) ^ 2 = Real.sqrt c ^ 2 * (Real.sqrt b - Real.sqrt a) ^ 2 := by ring rw [this, Real.sq_sqrt hc] ring /-- Normalization to ratio `t = b / a` for `bernoulliEnt`. -/ lemma bernoulliEnt_eq_mul_one {p a b : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ha : 0 < a) (hb : 0 < b) : bernoulliEnt p a b = a * bernoulliEnt p 1 (b / a) := by have h := bernoulliEnt_scale hp0 hp1 zero_lt_one (div_pos hb ha) ha rwa [mul_one, mul_div_cancel₀ b (ne_of_gt ha)] at h /-- Normalization to ratio `t = b / a` for `bernoulliDirichletLog`. -/ lemma bernoulliDirichletLog_eq_mul_one {p a b : ℝ} (ha : 0 < a) (hb : 0 < b) : bernoulliDirichletLog p a b = a * bernoulliDirichletLog p 1 (b / a) := by have h := bernoulliDirichletLog_scale (p := p) zero_lt_one (div_pos hb ha) ha rwa [mul_one, mul_div_cancel₀ b (ne_of_gt ha)] at h /-- Normalization to ratio `t = b / a` for `bernoulliDirichletSqrt`. -/ lemma bernoulliDirichletSqrt_eq_mul_one {p a b : ℝ} (ha : 0 < a) : bernoulliDirichletSqrt p a b = a * bernoulliDirichletSqrt p 1 (b / a) := by have h := bernoulliDirichletSqrt_scale (p := p) (a := 1) (b := b / a) (le_of_lt ha) rwa [mul_one, mul_div_cancel₀ b (ne_of_gt ha)] at h /-- Nonnegativity of two-point entropy (with equality iff `a = b`). -/ theorem bernoulliEnt_nonneg {p a b : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ha : 0 < a) (hb : 0 < b) : 0 ≤ bernoulliEnt p a b := by have hm := bernoulliMean_pos hp0 hp1 ha hb have h1 : Real.log (bernoulliMean p a b / a) ≤ bernoulliMean p a b / a - 1 := Real.log_le_sub_one_of_pos (div_pos hm ha) have h2 : Real.log (bernoulliMean p a b / b) ≤ bernoulliMean p a b / b - 1 := Real.log_le_sub_one_of_pos (div_pos hm hb) rw [Real.log_div (ne_of_gt hm) (ne_of_gt ha)] at h1 rw [Real.log_div (ne_of_gt hm) (ne_of_gt hb)] at h2 have h1' := mul_le_mul_of_nonneg_left h1 (show 0 ≤ (1 - p) * a by nlinarith) have h2' := mul_le_mul_of_nonneg_left h2 (show 0 ≤ p * b by nlinarith) have ha0 : a ≠ 0 := ne_of_gt ha have hb0 : b ≠ 0 := ne_of_gt hb have hcomb : (1 - p) * a * (bernoulliMean p a b / a - 1) + p * b * (bernoulliMean p a b / b - 1) = 0 := by field_simp unfold bernoulliMean ring unfold bernoulliEnt bernoulliMean at * linarith /-- Strict positivity of two-point entropy whenever `a ≠ b`. -/ theorem bernoulliEnt_pos {p a b : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ha : 0 < a) (hb : 0 < b) (hab : a ≠ b) : 0 < bernoulliEnt p a b := by have hm := bernoulliMean_pos hp0 hp1 ha hb have hma : bernoulliMean p a b / a ≠ 1 := by intro heq rw [div_eq_one_iff_eq (ne_of_gt ha)] at heq unfold bernoulliMean at heq apply hab; nlinarith have h1 : Real.log (bernoulliMean p a b / a) < bernoulliMean p a b / a - 1 := Real.log_lt_sub_one_of_pos (div_pos hm ha) hma have h2 : Real.log (bernoulliMean p a b / b) ≤ bernoulliMean p a b / b - 1 := Real.log_le_sub_one_of_pos (div_pos hm hb) rw [Real.log_div (ne_of_gt hm) (ne_of_gt ha)] at h1 rw [Real.log_div (ne_of_gt hm) (ne_of_gt hb)] at h2 have h1' := mul_lt_mul_of_pos_left h1 (show 0 < (1 - p) * a by nlinarith) have h2' := mul_le_mul_of_nonneg_left h2 (show 0 ≤ p * b by nlinarith) have ha0 : a ≠ 0 := ne_of_gt ha have hb0 : b ≠ 0 := ne_of_gt hb have hcomb : (1 - p) * a * (bernoulliMean p a b / a - 1) + p * b * (bernoulliMean p a b / b - 1) = 0 := by field_simp unfold bernoulliMean ring unfold bernoulliEnt bernoulliMean at * linarith /-- **Exact Jensen-Gap Identity:** `E_{μ_p}(f, log f) - Ent_{μ_p}(f) = m (log m - ((1 - p) log a + p log b))`. -/ theorem dirichletLog_sub_ent_eq (p a b : ℝ) : bernoulliDirichletLog p a b - bernoulliEnt p a b = bernoulliMean p a b * (Real.log (bernoulliMean p a b) - ((1 - p) * Real.log a + p * Real.log b)) := by unfold bernoulliDirichletLog bernoulliEnt bernoulliMean ring /-- **Bobkov–Tetali (2006) Lower Bound (`ρ_0(p) ≥ 1`)** in 4 lines from the Jensen-Gap Identity. -/ theorem mlsi_ge_one {p a b : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ha : 0 < a) (hb : 0 < b) : bernoulliEnt p a b ≤ bernoulliDirichletLog p a b := by have hm := bernoulliMean_pos hp0 hp1 ha hb have hgap := dirichletLog_sub_ent_eq p a b have h1 : Real.log (a / bernoulliMean p a b) ≤ a / bernoulliMean p a b - 1 := Real.log_le_sub_one_of_pos (div_pos ha hm) have h2 : Real.log (b / bernoulliMean p a b) ≤ b / bernoulliMean p a b - 1 := Real.log_le_sub_one_of_pos (div_pos hb hm) rw [Real.log_div (ne_of_gt ha) (ne_of_gt hm)] at h1 rw [Real.log_div (ne_of_gt hb) (ne_of_gt hm)] at h2 have h1' := mul_le_mul_of_nonneg_left h1 (by linarith : 0 ≤ 1 - p) have h2' := mul_le_mul_of_nonneg_left h2 (le_of_lt hp0) have hm0 : bernoulliMean p a b ≠ 0 := ne_of_gt hm have hsum : (1 - p) * (a / bernoulliMean p a b - 1) + p * (b / bernoulliMean p a b - 1) = 0 := by field_simp; unfold bernoulliMean; ring have hlog : (1 - p) * Real.log a + p * Real.log b ≤ Real.log (bernoulliMean p a b) := by linarith have hmul : 0 ≤ bernoulliMean p a b * (Real.log (bernoulliMean p a b) - ((1 - p) * Real.log a + p * Real.log b)) := mul_nonneg (le_of_lt hm) (sub_nonneg.mpr hlog) linarith /-! ## Section 3: Master Second-Derivative Quadratic Factorization & One-Point Reduction -/ /-- Normalized MLSI discrepancy functional `Φ_ρ(p, t) = E_{μ_p}(f, log f) - ρ Ent_{μ_p}(f)` at `f = (1, t)`. -/ def phiRho (p ρ t : ℝ) : ℝ := p * (1 - p) * (t - 1) * Real.log t - ρ * (p * t * Real.log t - ((1 - p) + p * t) * Real.log ((1 - p) + p * t)) /-- Exact first derivative `Φ_ρ'(p, t)`. -/ def phiRhoDeriv (p ρ t : ℝ) : ℝ := p * (1 - p) * (Real.log t + 1 - 1 / t) - ρ * p * (Real.log t - Real.log ((1 - p) + p * t)) /-- Exact second derivative `Φ_ρ''(p, t) = p (1 - p) (p t^2 + (1 - ρ) t + (1 - p)) / (t^2 (q + p t))`. -/ def phiRhoDeriv2 (p ρ t : ℝ) : ℝ := p * (1 - p) * (p * t ^ 2 + (1 - ρ) * t + (1 - p)) / (t ^ 2 * ((1 - p) + p * t)) lemma phiRho_eq_func (p ρ t : ℝ) : phiRho p ρ t = bernoulliDirichletLog p 1 t - ρ * bernoulliEnt p 1 t := by unfold phiRho bernoulliDirichletLog bernoulliEnt bernoulliMean simp [Real.log_one] lemma phiRho_one (p ρ : ℝ) : phiRho p ρ 1 = 0 := by unfold phiRho have : (1 - p) + p * 1 = 1 := by ring rw [this, Real.log_one] ring lemma phiRhoDeriv_one (p ρ : ℝ) : phiRhoDeriv p ρ 1 = 0 := by unfold phiRhoDeriv have : (1 - p) + p * 1 = 1 := by ring rw [this, Real.log_one] ring /-- First derivative of `Φ_ρ(p, ·)`. -/ theorem hasDerivAt_phiRho {p ρ t : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ht : 0 < t) : HasDerivAt (phiRho p ρ) (phiRhoDeriv p ρ t) t := by have ht0 : t ≠ 0 := ne_of_gt ht have hm : (1 - p) + p * t ≠ 0 := by nlinarith have h1 : HasDerivAt (fun s => p * (1 - p) * (s - 1) * Real.log s) (p * (1 - p) * (Real.log t + (t - 1) / t)) t := by have ha : HasDerivAt (fun s => p * (1 - p) * (s - 1)) (p * (1 - p)) t := (((hasDerivAt_id' t).sub_const 1).const_mul (p * (1 - p))).congr_deriv (by ring) exact (ha.mul (Real.hasDerivAt_log ht0)).congr_deriv (by field_simp) have h2 : HasDerivAt (fun s => p * s * Real.log s) (p * (Real.log t + 1)) t := by have ha : HasDerivAt (fun s => p * s) p t := ((hasDerivAt_id' t).const_mul p).congr_deriv (by ring) exact (ha.mul (Real.hasDerivAt_log ht0)).congr_deriv (by field_simp) have h3 : HasDerivAt (fun s => ((1 - p) + p * s) * Real.log ((1 - p) + p * s)) (p * (Real.log ((1 - p) + p * t) + 1)) t := by have ha : HasDerivAt (fun s => (1 - p) + p * s) p t := (((hasDerivAt_id' t).const_mul p).const_add (1 - p)).congr_deriv (by ring) exact (ha.mul (ha.log hm)).congr_deriv (by field_simp) exact (h1.sub ((h2.sub h3).const_mul ρ)).congr_deriv (by unfold phiRhoDeriv; field_simp; ring) /-- **Master Second-Derivative Quadratic Factorization:** `Φ_ρ''(p, t) = p (1 - p) (p t^2 + (1 - ρ) t + (1 - p)) / (t^2 ((1 - p) + p t))`. -/ theorem hasDerivAt_phiRho' {p ρ t : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ht : 0 < t) : HasDerivAt (phiRhoDeriv p ρ) (phiRhoDeriv2 p ρ t) t := by have ht0 : t ≠ 0 := ne_of_gt ht have hm : (1 - p) + p * t ≠ 0 := by nlinarith have h1 : HasDerivAt (fun s => Real.log s + 1 - 1 / s) (1 / t + 1 / t ^ 2) t := by have hinv : HasDerivAt (fun s => (1 : ℝ) / s) (-(1 : ℝ) / t ^ 2) t := ((hasDerivAt_const t (1 : ℝ)).div (hasDerivAt_id' t) ht0).congr_deriv (by ring) exact (((Real.hasDerivAt_log ht0).add_const 1).sub hinv).congr_deriv (by ring) have h2 : HasDerivAt (fun s => Real.log s - Real.log ((1 - p) + p * s)) (1 / t - p / ((1 - p) + p * t)) t := by have ha : HasDerivAt (fun s => (1 - p) + p * s) p t := (((hasDerivAt_id' t).const_mul p).const_add (1 - p)).congr_deriv (by ring) exact ((Real.hasDerivAt_log ht0).sub (ha.log hm)).congr_deriv (by ring) exact ((h1.const_mul (p * (1 - p))).sub (h2.const_mul (ρ * p))).congr_deriv (by unfold phiRhoDeriv2; field_simp; ring) /-- **Erbar–Maas (2012) / Mielke (2013) Entropic Ricci Curvature Lower Bound:** `E_{μ_p}(f, log f) ≥ (1 + 2 √(p (1 - p))) Ent_{μ_p}(f)` for all `p ∈ (0, 1)` and `f > 0`. -/ theorem mlsi_ge_erbarMaas {p a b : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ha : 0 < a) (hb : 0 < b) : (1 + 2 * Real.sqrt (p * (1 - p))) * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b := by rw [bernoulliEnt_eq_mul_one hp0 hp1 ha hb, bernoulliDirichletLog_eq_mul_one ha hb] set ρ := 1 + 2 * Real.sqrt (p * (1 - p)) set t := b / a have ht : 0 < t := div_pos hb ha suffices hphi : 0 ≤ phiRho p ρ t by rw [phiRho_eq_func] at hphi nlinarith have hderiv2_nn : ∀ s : ℝ, 0 < s → 0 ≤ phiRhoDeriv2 p ρ s := by intro s hs0 have hm : 0 < (1 - p) + p * s := by nlinarith unfold phiRhoDeriv2 have hquad : p * s ^ 2 + (1 - ρ) * s + (1 - p) = (Real.sqrt p * s - Real.sqrt (1 - p)) ^ 2 := by have hsq : Real.sqrt (p * (1 - p)) = Real.sqrt p * Real.sqrt (1 - p) := Real.sqrt_mul (le_of_lt hp0) (1 - p) simp only [ρ, hsq] nlinarith [Real.sq_sqrt (le_of_lt hp0), Real.sq_sqrt (show 0 ≤ 1 - p by linarith)] rw [hquad] have h1p : 0 < 1 - p := by linarith positivity have hmono' : MonotoneOn (phiRhoDeriv p ρ) (Set.Ioi 0) := monotoneOn_of_deriv_nonneg (convex_Ioi 0) (fun s hs => (hasDerivAt_phiRho' hp0 hp1 hs).continuousAt.continuousWithinAt) (fun s hs => (hasDerivAt_phiRho' hp0 hp1 (by rw [interior_Ioi] at hs; exact hs)).differentiableAt.differentiableWithinAt) (fun s hs => by rw [interior_Ioi] at hs; rw [(hasDerivAt_phiRho' hp0 hp1 hs).deriv]; exact hderiv2_nn s hs) by_cases ht1 : 1 ≤ t · have hmono : MonotoneOn (phiRho p ρ) (Set.Ici 1) := monotoneOn_of_deriv_nonneg (convex_Ici 1) (fun s hs => (hasDerivAt_phiRho hp0 hp1 (by linarith [Set.mem_Ici.mp hs])).continuousAt.continuousWithinAt) (fun s hs => by rw [interior_Ici] at hs have hs1 : 1 < s := hs exact (hasDerivAt_phiRho hp0 hp1 (by linarith)).differentiableAt.differentiableWithinAt) (fun s hs => by rw [interior_Ici] at hs have hs1 : 1 < s := hs rw [(hasDerivAt_phiRho hp0 hp1 (by linarith)).deriv, ← phiRhoDeriv_one p ρ] exact hmono' (Set.mem_Ioi.mpr zero_lt_one) (Set.mem_Ioi.mpr (by linarith)) (le_of_lt hs1)) rw [← phiRho_one p ρ] exact hmono Set.self_mem_Ici ht1 ht1 · push Not at ht1 have hanti : AntitoneOn (phiRho p ρ) (Set.Ioc 0 1) := antitoneOn_of_deriv_nonpos (convex_Ioc 0 1) (fun s hs => (hasDerivAt_phiRho hp0 hp1 hs.1).continuousAt.continuousWithinAt) (fun s hs => by rw [interior_Ioc] at hs exact (hasDerivAt_phiRho hp0 hp1 hs.1).differentiableAt.differentiableWithinAt) (fun s hs => by rw [interior_Ioc] at hs rw [(hasDerivAt_phiRho hp0 hp1 hs.1).deriv, ← phiRhoDeriv_one p ρ] exact hmono' (Set.mem_Ioi.mpr hs.1) (Set.mem_Ioi.mpr zero_lt_one) (le_of_lt hs.2)) rw [← phiRho_one p ρ] exact hanti ⟨ht, le_of_lt ht1⟩ ⟨zero_lt_one, le_rfl⟩ (le_of_lt ht1) /-- At `p = 1/2`, the exact MLSI lower bound is `2`. -/ theorem mlsi_half_ge_two {a b : ℝ} (ha : 0 < a) (hb : 0 < b) : 2 * bernoulliEnt (1 / 2) a b ≤ bernoulliDirichletLog (1 / 2) a b := by have h := mlsi_ge_erbarMaas (p := 1 / 2) (by norm_num) (by norm_num) ha hb have hsq : Real.sqrt ((1 / 2 : ℝ) * (1 - 1 / 2)) = 1 / 2 := by rw [show (1 / 2 : ℝ) * (1 - 1 / 2) = (1 / 2) ^ 2 by norm_num, Real.sqrt_sq (by norm_num)] rw [hsq] at h linarith /-- Universal upper bound `ρ_0(p) ≤ 2` (exact at `p = 1/2`, where `ρ_0(1/2) = 2`). -/ theorem mlsi_le_two {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) {ρ : ℝ} (hρ : ∀ a b : ℝ, 0 < a → 0 < b → ρ * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b) : ρ ≤ 2 := by by_contra hgt push Not at hgt have hd2_1 : phiRhoDeriv2 p ρ 1 < 0 := by unfold phiRhoDeriv2 have h1p : 0 < 1 - p := by linarith have hnum : p * (1 - p) * (p * 1 ^ 2 + (1 - ρ) * 1 + (1 - p)) = p * (1 - p) * (2 - ρ) := by ring have hden : 1 ^ 2 * ((1 - p) + p * 1) = 1 := by ring rw [hnum, hden, div_one] nlinarith [mul_pos hp0 h1p] have hcont : ContinuousAt (phiRhoDeriv2 p ρ) 1 := by unfold phiRhoDeriv2 apply ContinuousAt.div · fun_prop · fun_prop · norm_num have hnhds : ∀ᶠ s in nhds (1 : ℝ), phiRhoDeriv2 p ρ s < 0 := hcont.eventually (gt_mem_nhds hd2_1) rw [Metric.eventually_nhds_iff] at hnhds obtain ⟨δ, hδ_pos, hδ⟩ := hnhds set ε := min (δ / 2) (1 / 2) have hε : 0 < ε := lt_min (by linarith) (by norm_num) have hsub : ∀ s : ℝ, 1 ≤ s → s ≤ 1 + ε → phiRhoDeriv2 p ρ s < 0 := by intro s hs1 hs2 apply hδ rw [Real.dist_eq, abs_lt] have hεd : ε ≤ δ / 2 := min_le_left _ _ constructor <;> linarith have hanti' : StrictAntiOn (phiRhoDeriv p ρ) (Set.Icc 1 (1 + ε)) := strictAntiOn_of_deriv_neg (convex_Icc 1 (1 + ε)) (fun s hs => (hasDerivAt_phiRho' hp0 hp1 (by linarith [hs.1])).continuousAt.continuousWithinAt) (fun s hs => by rw [interior_Icc] at hs rw [(hasDerivAt_phiRho' hp0 hp1 (by linarith [hs.1])).deriv] exact hsub s (le_of_lt hs.1) (le_of_lt hs.2)) have hanti : StrictAntiOn (phiRho p ρ) (Set.Icc 1 (1 + ε)) := strictAntiOn_of_deriv_neg (convex_Icc 1 (1 + ε)) (fun s hs => (hasDerivAt_phiRho hp0 hp1 (by linarith [hs.1])).continuousAt.continuousWithinAt) (fun s hs => by rw [interior_Icc] at hs rw [(hasDerivAt_phiRho hp0 hp1 (by linarith [hs.1])).deriv, ← phiRhoDeriv_one p ρ] exact hanti' ⟨le_rfl, by linarith⟩ ⟨le_of_lt hs.1, le_of_lt hs.2⟩ hs.1) have hneg : phiRho p ρ (1 + ε) < 0 := by rw [← phiRho_one p ρ] exact hanti ⟨le_rfl, by linarith⟩ ⟨by linarith, le_rfl⟩ (by linarith) have hle := hρ 1 (1 + ε) zero_lt_one (by linarith) rw [phiRho_eq_func] at hneg linarith /-- Exact algebraic margin `F(L, D) = D (e^L + 1) M(L, D)`. -/ def onePointMargin (L D : ℝ) : ℝ := (Real.exp L + D) * (D + 1) * (Real.log (D + 1) - Real.log (Real.exp L + 1)) + Real.exp L * D * (L + 1 - Real.log D) - D ^ 2 /-- Exact bridge identity connecting `phiRhoDeriv` at the upper root `s = (1 - p)/(p D)` to `onePointMargin L D`. -/ theorem phiRhoDeriv_at_upper_root_eq_margin {p D : ℝ} (hp0 : 0 < p) (hp1 : p < 1 / 2) (hD : 0 < D) : let q := 1 - p let L := Real.log (q / p) let ρ := 1 + q / D + p * D let s := q / (p * D) phiRhoDeriv p ρ s = p / (D * (Real.exp L + 1)) * onePointMargin L D := by intro q L ρ s have hq : 0 < q := by linarith have hqp : 0 < q / p := div_pos hq hp0 have hE : Real.exp L = q / p := Real.exp_log hqp have hqps : q + p * s = q * (D + 1) / D := by simp only [s]; field_simp [ne_of_gt hp0, ne_of_gt hD] have hlog_s : Real.log s = L - Real.log D := by have : s = (q / p) / D := by simp only [s]; field_simp rw [this, Real.log_div (ne_of_gt hqp) (ne_of_gt hD)] have hlog_qps : Real.log (q + p * s) = Real.log q + Real.log (D + 1) - Real.log D := by rw [hqps, Real.log_div (ne_of_gt (mul_pos hq (by linarith))) (ne_of_gt hD), Real.log_mul (ne_of_gt hq) (by linarith)] have hlog_E1 : Real.log (Real.exp L + 1) = -Real.log p := by have hE1 : Real.exp L + 1 = 1 / p := by rw [hE]; simp only [q]; field_simp [ne_of_gt hp0]; ring rw [hE1, Real.log_div one_ne_zero (ne_of_gt hp0), Real.log_one, zero_sub] have hlog_q : Real.log q = L + Real.log p := by have : L = Real.log q - Real.log p := Real.log_div (ne_of_gt hq) (ne_of_gt hp0) linarith have h1s : 1 / s = p * D / q := by simp only [s]; field_simp [ne_of_gt hp0, ne_of_gt hq, ne_of_gt hD] unfold phiRhoDeriv onePointMargin change p * q * (Real.log s + 1 - 1 / s) - ρ * p * (Real.log s - Real.log (q + p * s)) = p / (D * (Real.exp L + 1)) * ((Real.exp L + D) * (D + 1) * (Real.log (D + 1) - Real.log (Real.exp L + 1)) + Real.exp L * D * (L + 1 - Real.log D) - D ^ 2) rw [hlog_s, hlog_qps, hlog_E1, hlog_q, h1s, hE] simp only [ρ] have hqp1 : q / p + 1 = 1 / p := by simp only [q]; field_simp [ne_of_gt hp0]; ring rw [hqp1] have hp_ne : p ≠ 0 := ne_of_gt hp0 have hq_ne : q ≠ 0 := ne_of_gt hq have hD_ne : D ≠ 0 := ne_of_gt hD field_simp simp only [q] ring /-- **Master One-Point Reduction Criterion:** For `p ∈ (0, 1/2)`, `q = 1 - p`, `L = log(q/p)`, and ANY `D ∈ [1, e^{L/2}]`, if `onePointMargin L D ≥ 0`, then `E_{μ_p}(f, log f) ≥ (1 + q / D + p D) Ent_{μ_p}(f)` for all `a, b > 0`! -/ theorem mlsi_ge_of_onePoint_margin {p D a b : ℝ} (hp0 : 0 < p) (hp1 : p < 1 / 2) (hD1 : 1 ≤ D) (hD_sq : D ^ 2 ≤ (1 - p) / p) (hmargin : 0 ≤ onePointMargin (Real.log ((1 - p) / p)) D) (ha : 0 < a) (hb : 0 < b) : (1 + (1 - p) / D + p * D) * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b := by have hp_lt1 : p < 1 := by linarith rw [bernoulliEnt_eq_mul_one hp0 hp_lt1 ha hb, bernoulliDirichletLog_eq_mul_one ha hb] set q := 1 - p set L := Real.log (q / p) set ρ := 1 + q / D + p * D set s := q / (p * D) set t := b / a have hq : 0 < q := by linarith have hD0 : 0 < D := by linarith have hDs : D ≤ s := by simp only [s] rw [le_div_iff₀ (mul_pos hp0 hD0)] have hmul := mul_le_mul_of_nonneg_left hD_sq (le_of_lt hp0) rw [mul_div_cancel₀ q (ne_of_gt hp0)] at hmul nlinarith have ht : 0 < t := div_pos hb ha suffices hphi : 0 ≤ phiRho p ρ t by rw [phiRho_eq_func] at hphi nlinarith have hquad : ∀ u : ℝ, p * u ^ 2 + (1 - ρ) * u + q = p * (u - D) * (u - s) := by intro u; simp only [ρ, s]; field_simp [ne_of_gt hp0, ne_of_gt hD0]; ring have hd2_nn_lo : ∀ u : ℝ, 0 < u → u ≤ D → 0 ≤ phiRhoDeriv2 p ρ u := by intro u hu0 huD unfold phiRhoDeriv2 change 0 ≤ p * q * (p * u ^ 2 + (1 - ρ) * u + q) / (u ^ 2 * (q + p * u)) rw [hquad u] have hprod : 0 ≤ (u - D) * (u - s) := mul_nonneg_of_nonpos_of_nonpos (by linarith) (by linarith) have hm : 0 < q + p * u := by nlinarith have : p * q * (p * (u - D) * (u - s)) = (p ^ 2 * q) * ((u - D) * (u - s)) := by ring rw [this] positivity have hd2_np_mid : ∀ u : ℝ, D ≤ u → u ≤ s → phiRhoDeriv2 p ρ u ≤ 0 := by intro u hDu hus unfold phiRhoDeriv2 change p * q * (p * u ^ 2 + (1 - ρ) * u + q) / (u ^ 2 * (q + p * u)) ≤ 0 rw [hquad u] have hu0 : 0 < u := by linarith have hprod : (u - D) * (u - s) ≤ 0 := mul_nonpos_of_nonneg_of_nonpos (by linarith) (by linarith) have hnum : p * q * (p * (u - D) * (u - s)) ≤ 0 := by have : p * q * (p * (u - D) * (u - s)) = (p ^ 2 * q) * ((u - D) * (u - s)) := by ring rw [this] exact mul_nonpos_of_nonneg_of_nonpos (by positivity) hprod have hden : 0 < u ^ 2 * (q + p * u) := mul_pos (sq_pos_of_pos hu0) (by nlinarith) exact div_nonpos_of_nonpos_of_nonneg hnum (le_of_lt hden) have hd2_nn_hi : ∀ u : ℝ, s ≤ u → 0 ≤ phiRhoDeriv2 p ρ u := by intro u hus have hu0 : 0 < u := by linarith unfold phiRhoDeriv2 change 0 ≤ p * q * (p * u ^ 2 + (1 - ρ) * u + q) / (u ^ 2 * (q + p * u)) rw [hquad u] have h1 : 0 ≤ u - D := by linarith have h2 : 0 ≤ u - s := by linarith have hm : 0 < q + p * u := by nlinarith positivity have hmono_lo : MonotoneOn (phiRhoDeriv p ρ) (Set.Ioc 0 D) := monotoneOn_of_deriv_nonneg (convex_Ioc 0 D) (fun u hu => (hasDerivAt_phiRho' hp0 hp_lt1 hu.1).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_phiRho' hp0 hp_lt1 (by rw [interior_Ioc] at hu; exact hu.1)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ioc] at hu rw [(hasDerivAt_phiRho' hp0 hp_lt1 hu.1).deriv] exact hd2_nn_lo u hu.1 (le_of_lt hu.2)) have hanti_mid : AntitoneOn (phiRhoDeriv p ρ) (Set.Icc D s) := antitoneOn_of_deriv_nonpos (convex_Icc D s) (fun u hu => (hasDerivAt_phiRho' hp0 hp_lt1 (by linarith [hu.1])).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_phiRho' hp0 hp_lt1 (by rw [interior_Icc] at hu; linarith [hu.1])).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Icc] at hu rw [(hasDerivAt_phiRho' hp0 hp_lt1 (by linarith [hu.1])).deriv] exact hd2_np_mid u (le_of_lt hu.1) (le_of_lt hu.2)) have hmono_hi : MonotoneOn (phiRhoDeriv p ρ) (Set.Ici s) := monotoneOn_of_deriv_nonneg (convex_Ici s) (fun u hu => (hasDerivAt_phiRho' hp0 hp_lt1 (by linarith [Set.mem_Ici.mp hu])).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_phiRho' hp0 hp_lt1 (by rw [interior_Ici] at hu; have : s < u := hu; linarith)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ici] at hu have hu' : s < u := hu rw [(hasDerivAt_phiRho' hp0 hp_lt1 (by linarith)).deriv] exact hd2_nn_hi u (le_of_lt hu')) have hd_s_nn : 0 ≤ phiRhoDeriv p ρ s := by have hbridge := phiRhoDeriv_at_upper_root_eq_margin hp0 hp1 hD0 dsimp only at hbridge rw [hbridge] have hEpos : 0 < Real.exp L + 1 := by positivity exact mul_nonneg (div_nonneg (le_of_lt hp0) (mul_nonneg (le_of_lt hD0) (le_of_lt hEpos))) hmargin have hd_ge_one : ∀ u : ℝ, 1 ≤ u → 0 ≤ phiRhoDeriv p ρ u := by intro u hu1 by_cases huD : u ≤ D · rw [← phiRhoDeriv_one p ρ] exact hmono_lo ⟨zero_lt_one, hD1⟩ ⟨by linarith, huD⟩ hu1 · push Not at huD by_cases hus : u ≤ s · exact le_trans hd_s_nn (hanti_mid ⟨le_of_lt huD, hus⟩ ⟨hDs, le_rfl⟩ hus) · push Not at hus exact le_trans hd_s_nn (hmono_hi Set.self_mem_Ici (le_of_lt hus) (le_of_lt hus)) have hd_le_one : ∀ u : ℝ, 0 < u → u ≤ 1 → phiRhoDeriv p ρ u ≤ 0 := by intro u hu0 hu1 rw [← phiRhoDeriv_one p ρ] exact hmono_lo ⟨hu0, le_trans hu1 hD1⟩ ⟨zero_lt_one, hD1⟩ hu1 by_cases ht1 : 1 ≤ t · have hmono : MonotoneOn (phiRho p ρ) (Set.Ici 1) := monotoneOn_of_deriv_nonneg (convex_Ici 1) (fun u hu => (hasDerivAt_phiRho hp0 hp_lt1 (by linarith [Set.mem_Ici.mp hu])).continuousAt.continuousWithinAt) (fun u hu => by rw [interior_Ici] at hu have hu1 : 1 < u := hu exact (hasDerivAt_phiRho hp0 hp_lt1 (by linarith)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ici] at hu have hu1 : 1 < u := hu rw [(hasDerivAt_phiRho hp0 hp_lt1 (by linarith)).deriv] exact hd_ge_one u (le_of_lt hu1)) rw [← phiRho_one p ρ] exact hmono Set.self_mem_Ici ht1 ht1 · push Not at ht1 have hanti : AntitoneOn (phiRho p ρ) (Set.Ioc 0 1) := antitoneOn_of_deriv_nonpos (convex_Ioc 0 1) (fun u hu => (hasDerivAt_phiRho hp0 hp_lt1 hu.1).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_phiRho hp0 hp_lt1 (by rw [interior_Ioc] at hu; exact hu.1)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ioc] at hu rw [(hasDerivAt_phiRho hp0 hp_lt1 hu.1).deriv] exact hd_le_one u hu.1 (le_of_lt hu.2)) rw [← phiRho_one p ρ] exact hanti ⟨ht, le_of_lt ht1⟩ ⟨zero_lt_one, le_rfl⟩ (le_of_lt ht1) /-! ## Section 4: Sharp Closed-Form Lower Bound at the Exact Critical Threshold `c = 3/4` -/ /-- Exact critical scale `D_{3/4}(L) = 1 + L - log(1 + (3/4) L)`. -/ def scaleD (L : ℝ) : ℝ := 1 + L - Real.log (1 + 3 / 4 * L) /-- Rational lower bound `P₁(L) = (13 L² + 24 L + 32) / (16 (L + 2)) ≤ D_{3/4}(L)`. -/ def rationalP1 (L : ℝ) : ℝ := (13 * L ^ 2 + 24 * L + 32) / (16 * (L + 2)) /-- Rational upper bound `U₂(L) = (32 + 32 L + 18 L² + 3 L³) / (32 + 24 L + 3 L²) ≥ D_{3/4}(L)`. -/ def rationalU2 (L : ℝ) : ℝ := (32 + 32 * L + 18 * L ^ 2 + 3 * L ^ 3) / (32 + 24 * L + 3 * L ^ 2) /-- Our sharp closed-form MLSI lower bound (valid on all `p ∈ (0, 1)` by symmetry). -/ def sharpMLSILower (p : ℝ) : ℝ := if p = 1 / 2 then 2 else if p < 1 / 2 then 1 + (1 - p) / scaleD (Real.log ((1 - p) / p)) + p * scaleD (Real.log ((1 - p) / p)) else 1 + p / scaleD (Real.log (p / (1 - p))) + (1 - p) * scaleD (Real.log (p / (1 - p))) lemma rationalP1_ge_one {L : ℝ} (hL : 0 ≤ L) : 1 ≤ rationalP1 L := by unfold rationalP1 rw [one_le_div (by linarith)] nlinarith lemma rationalP1_le_scaleD {L : ℝ} (hL : 0 ≤ L) : rationalP1 L ≤ scaleD L := by have hp := log_one_add_le_pade21 (x := 3 / 4 * L) (by linarith) unfold rationalP1 scaleD have hrew : 1 + L - 3 / 4 * L * (6 + 3 / 4 * L) / (6 + 4 * (3 / 4 * L)) = (13 * L ^ 2 + 24 * L + 32) / (16 * (L + 2)) := by have hd1 : 6 + 4 * (3 / 4 * L) ≠ 0 := by linarith have hd2 : 16 * (L + 2) ≠ 0 := by linarith field_simp ring linarith lemma scaleD_le_rationalU2 {L : ℝ} (hL : 0 ≤ L) : scaleD L ≤ rationalU2 L := by have hp := pade22_le_log_one_add (x := 3 / 4 * L) (by linarith) unfold scaleD rationalU2 have hrew : 1 + L - 3 / 4 * L * (6 + 3 * (3 / 4 * L)) / (6 + 6 * (3 / 4 * L) + (3 / 4 * L) ^ 2) = (32 + 32 * L + 18 * L ^ 2 + 3 * L ^ 3) / (32 + 24 * L + 3 * L ^ 2) := by have hd1 : 6 + 6 * (3 / 4 * L) + (3 / 4 * L) ^ 2 ≠ 0 := by nlinarith have hd2 : 32 + 24 * L + 3 * L ^ 2 ≠ 0 := by nlinarith field_simp ring linarith /-- Strict lower bound `1 < D_{3/4}(L)` for `L > 0`. -/ lemma one_lt_scaleD {L : ℝ} (hL : 0 < L) : 1 < scaleD L := by have hlog : Real.log (1 + 3 / 4 * L) ≤ 3 / 4 * L := by have := Real.log_le_sub_one_of_pos (by linarith : 0 < 1 + 3 / 4 * L) linarith unfold scaleD linarith /-- Strict upper bound `D_{3/4}(L) < e^{L/2}` for all `L > 0` (1-line quadratic proof!). -/ theorem scaleD_lt_exp_half {L : ℝ} (hL : 0 < L) : scaleD L < Real.exp (L / 2) := by set g : ℝ → ℝ := fun t => Real.exp (t / 2) - scaleD t have hderiv : ∀ t : ℝ, 0 ≤ t → HasDerivAt g (1 / 2 * Real.exp (t / 2) - 1 + (3 / 4) / (1 + 3 / 4 * t)) t := by intro t ht0 have h1 : HasDerivAt (fun s => Real.exp (s / 2)) (1 / 2 * Real.exp (t / 2)) t := (((hasDerivAt_id' t).div_const 2).exp).congr_deriv (by ring) have h2 : HasDerivAt scaleD (1 - (3 / 4) / (1 + 3 / 4 * t)) t := by unfold scaleD have hlin : HasDerivAt (fun s => 1 + 3 / 4 * s) (3 / 4) t := (((hasDerivAt_id' t).const_mul (3 / 4 : ℝ)).const_add 1).congr_deriv (by ring) have hlog := hlin.log (by linarith : 1 + 3 / 4 * t ≠ 0) exact (((hasDerivAt_id' t).const_add 1).sub hlog).congr_deriv (by ring) exact (h1.sub h2).congr_deriv (by ring) have hsm : StrictMonoOn g (Set.Ici 0) := by apply strictMonoOn_of_deriv_pos (convex_Ici 0) · exact fun t ht => (hderiv t ht).continuousAt.continuousWithinAt · intro t ht rw [interior_Ici] at ht have ht0 : 0 < t := ht rw [(hderiv t (le_of_lt ht0)).deriv] have hexp : 1 + t / 2 ≤ Real.exp (t / 2) := by have := Real.add_one_le_exp (t / 2); linarith have hd : 0 < 1 + 3 / 4 * t := by linarith have hquad : 0 < (1 / 2 * (1 + t / 2) - 1) * (1 + 3 / 4 * t) + 3 / 4 := by nlinarith [sq_nonneg (t - 1 / 3)] have hdiv : 0 < (1 / 2 * (1 + t / 2) - 1) + (3 / 4) / (1 + 3 / 4 * t) := by have := div_pos hquad hd rw [add_div, mul_div_cancel_right₀ _ (ne_of_gt hd)] at this exact this linarith have hg0 : g 0 = 0 := by simp [g, scaleD] have hgt : g 0 < g L := hsm Set.self_mem_Ici (le_of_lt hL) hL simp only [g, hg0] at hgt linarith lemma scaleD_sq_lt_exp {L : ℝ} (hL : 0 < L) : scaleD L ^ 2 < Real.exp L := by have h1 : 0 < scaleD L := lt_trans zero_lt_one (one_lt_scaleD hL) have h2 := scaleD_lt_exp_half hL have hsq : scaleD L ^ 2 < Real.exp (L / 2) ^ 2 := by nlinarith have he : Real.exp (L / 2) ^ 2 = Real.exp L := by rw [sq, ← Real.exp_add, add_halves] linarith /-- Global lower ratio `D_{3/4}(L) + 1 ≥ (9/8)(1 + (3/4) L)` for all `L ≥ 0`. -/ lemma nine_eighths_le_scaleD_add_one {L : ℝ} (hL : 0 ≤ L) : 9 / 8 * (1 + 3 / 4 * L) ≤ scaleD L + 1 := by have hlog_c : Real.log (24 / 5) ≤ 5 / 3 := by rw [Real.log_le_iff_le_exp (by norm_num)] have h4 := Real.sum_le_exp_of_nonneg (show (0 : ℝ) ≤ 5 / 3 by norm_num) 5 simp only [Finset.sum_range_succ, Finset.range_zero, Finset.sum_empty, Nat.factorial] at h4 norm_num at h4 ⊢ linarith have hu : 0 < 1 + 3 / 4 * L := by linarith have htan : Real.log ((1 + 3 / 4 * L) / (24 / 5)) ≤ (1 + 3 / 4 * L) / (24 / 5) - 1 := Real.log_le_sub_one_of_pos (div_pos hu (by norm_num)) rw [Real.log_div (ne_of_gt hu) (by norm_num)] at htan unfold scaleD linarith /-- Monotonicity of the normalized margin `H(L, D) = F(L, D) / ((e^L + D)(D + 1))` in `D ∈ [1, e^{L/2}]`. -/ theorem onePointMargin_monotone_in_D {L D₁ D₂ : ℝ} (hL : 0 < L) (hD₁ : 1 ≤ D₁) (hD₁₂ : D₁ ≤ D₂) (hD₂ : D₂ ^ 2 ≤ Real.exp L) (hpos : 0 ≤ onePointMargin L D₁) : 0 ≤ onePointMargin L D₂ := by set E := Real.exp L have hE : 1 < E := Real.one_lt_exp_iff.mpr hL set H : ℝ → ℝ := fun D => Real.log (D + 1) - Real.log (E + 1) + (E * D * (L + 1 - Real.log D) - D ^ 2) / ((E + D) * (D + 1)) have hH_eq : ∀ D : ℝ, 0 < D → H D = onePointMargin L D / ((E + D) * (D + 1)) := by intro D hD have h1 : (E + D) * (D + 1) ≠ 0 := by nlinarith simp only [H, onePointMargin, E] field_simp ring have hderiv : ∀ D : ℝ, 1 ≤ D → D ≤ Real.sqrt E → HasDerivAt H ((D ^ 2 - E) * (D - E * (L + 1 - Real.log D)) / ((D + 1) ^ 2 * (E + D) ^ 2)) D := by intro D hD1 hDE have hD0 : 0 < D := by linarith have hD_ne : D ≠ 0 := ne_of_gt hD0 have hD1_ne : D + 1 ≠ 0 := by linarith have hED_ne : E + D ≠ 0 := by linarith have hden_ne : (E + D) * (D + 1) ≠ 0 := mul_ne_zero hED_ne hD1_ne have hlog1 : HasDerivAt (fun x => Real.log (x + 1)) (1 / (D + 1)) D := (((hasDerivAt_id' D).add_const 1).log hD1_ne).congr_deriv (by ring) have hnum : HasDerivAt (fun x => E * x * (L + 1 - Real.log x) - x ^ 2) (E * (L - Real.log D) - 2 * D) D := by have ha : HasDerivAt (fun x => E * x) E D := ((hasDerivAt_id' D).const_mul E).congr_deriv (by ring) have hb : HasDerivAt (fun x => L + 1 - Real.log x) (-(1 / D)) D := ((hasDerivAt_const D (L + 1)).sub (Real.hasDerivAt_log hD_ne)).congr_deriv (by ring) have hsq : HasDerivAt (fun x => x ^ 2) (2 * D) D := ((hasDerivAt_id' D).pow 2).congr_deriv (by ring) exact ((ha.mul hb).sub hsq).congr_deriv (by field_simp; ring) have hden : HasDerivAt (fun x => (E + x) * (x + 1)) (E + 2 * D + 1) D := (((hasDerivAt_id' D).const_add E).mul ((hasDerivAt_id' D).add_const 1)).congr_deriv (by ring) have hrat := hnum.div hden hden_ne exact ((hlog1.sub_const (Real.log (E + 1))).add hrat).congr_deriv (by field_simp; ring) have hmono : MonotoneOn H (Set.Icc 1 (Real.sqrt E)) := by apply monotoneOn_of_deriv_nonneg (convex_Icc 1 (Real.sqrt E)) · exact fun D hD => (hderiv D hD.1 hD.2).continuousAt.continuousWithinAt · intro D hD; rw [interior_Icc] at hD exact (hderiv D (le_of_lt hD.1) (le_of_lt hD.2)).differentiableAt.differentiableWithinAt · intro D hD; rw [interior_Icc] at hD rw [(hderiv D (le_of_lt hD.1) (le_of_lt hD.2)).deriv] have hD1' : 1 ≤ D := le_of_lt hD.1 have hDE' : D ≤ Real.sqrt E := le_of_lt hD.2 have hDsq : D ^ 2 ≤ E := by calc D ^ 2 ≤ Real.sqrt E ^ 2 := pow_le_pow_left₀ (by linarith) hDE' 2 _ = E := Real.sq_sqrt (by linarith) have hf1 : D ^ 2 - E ≤ 0 := by linarith have hlogD : Real.log D ≤ L := by have hDE : D ≤ E := by nlinarith calc Real.log D ≤ Real.log E := Real.log_le_log (by linarith) hDE _ = L := Real.log_exp L have hf2 : D - E * (L + 1 - Real.log D) ≤ 0 := by have hDE : D ≤ E := by nlinarith nlinarith have hnum : 0 ≤ (D ^ 2 - E) * (D - E * (L + 1 - Real.log D)) := mul_nonneg_of_nonpos_of_nonpos hf1 hf2 have hden : 0 < (D + 1) ^ 2 * (E + D) ^ 2 := by positivity exact div_nonneg hnum (le_of_lt hden) have hD₂_le : D₂ ≤ Real.sqrt E := by have : D₂ = Real.sqrt (D₂ ^ 2) := (Real.sqrt_sq (by linarith)).symm rw [this]; exact Real.sqrt_le_sqrt hD₂ have hD₁_le : D₁ ≤ Real.sqrt E := le_trans hD₁₂ hD₂_le have hHD : H D₁ ≤ H D₂ := hmono ⟨hD₁, hD₁_le⟩ ⟨le_trans hD₁ hD₁₂, hD₂_le⟩ hD₁₂ rw [hH_eq D₁ (by linarith), hH_eq D₂ (by linarith)] at hHD have h1 : 0 ≤ onePointMargin L D₁ / ((E + D₁) * (D₁ + 1)) := div_nonneg hpos (by nlinarith) have h2 : 0 ≤ onePointMargin L D₂ / ((E + D₂) * (D₂ + 1)) := le_trans h1 hHD have hden2 : 0 < (E + D₂) * (D₂ + 1) := by nlinarith exact (div_nonneg_iff.mp h2).elim (fun h => h.1) (fun h => by linarith) /-- Log-free Simpson surrogate `F_NL(L, E)` evaluated at `P₁(L)`. -/ def simpsonMarginNL (L E : ℝ) : ℝ := let P := rationalP1 L E * P * (L + 1 - (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P)) - P ^ 2 - (E + P) * (P + 1) * ((E - P) / 6 * (1 / (P + 1) + 8 / (E + P + 2) + 1 / (E + 1))) /-- Key monotonicity of `simpsonMarginNL L E` in `E`: for `0 < L ≤ 11/5` and `exp L ≤ E`, `∂/∂E simpsonMarginNL L E ≤ 0`. -/ lemma simpsonMarginNL_antitone_in_E {L : ℝ} (hL0 : 0 < L) (hL1 : L ≤ 11 / 5) : AntitoneOn (simpsonMarginNL L) (Set.Ici (Real.exp L)) := by set P := rationalP1 L have hP1 : 1 ≤ P := rationalP1_ge_one (le_of_lt hL0) have hP_lt_E : P ≤ Real.exp L := by have h1 := rationalP1_le_scaleD (le_of_lt hL0) have h2 := scaleD_lt_exp_half hL0 have h3 : Real.exp (L / 2) ≤ Real.exp L := Real.exp_le_exp.mpr (by linarith) linarith have hderiv : ∀ E : ℝ, Real.exp L ≤ E → HasDerivAt (simpsonMarginNL L) (P * (L + 1 - (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P)) - 1 / 6 * (2 * E + 8 * (P + 1) * ((E ^ 2 + 2 * E * P + 4 * E + P ^ 2) / (E + P + 2) ^ 2) + (P + 1) * ((E ^ 2 + 2 * E + P ^ 2) / (E + 1) ^ 2))) E := by intro E hE have hEP : P ≤ E := le_trans hP_lt_E hE have hE1 : E + 1 ≠ 0 := by linarith have hEP2 : E + P + 2 ≠ 0 := by linarith have hP1_ne : P + 1 ≠ 0 := by linarith have hrew : simpsonMarginNL L = fun x => x * (P * (L + 1 - (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P))) - P ^ 2 - 1 / 6 * ((x ^ 2 - P ^ 2) + 8 * (P + 1) * ((x ^ 2 - P ^ 2) / (x + P + 2)) + (P + 1) * ((x ^ 2 - P ^ 2) / (x + 1))) := by ext x simp only [simpsonMarginNL, P] have hterm : (x + P) * (P + 1) * ((x - P) / 6 * (1 / (P + 1) + 8 / (x + P + 2) + 1 / (x + 1))) = 1 / 6 * ((x ^ 2 - P ^ 2) + 8 * (P + 1) * ((x ^ 2 - P ^ 2) / (x + P + 2)) + (P + 1) * ((x ^ 2 - P ^ 2) / (x + 1))) := by have h1 : (P + 1) * (1 / (P + 1)) = 1 := mul_one_div_cancel hP1_ne calc (x + P) * (P + 1) * ((x - P) / 6 * (1 / (P + 1) + 8 / (x + P + 2) + 1 / (x + 1))) = 1 / 6 * ((x ^ 2 - P ^ 2) * ((P + 1) * (1 / (P + 1))) + 8 * (P + 1) * ((x ^ 2 - P ^ 2) / (x + P + 2)) + (P + 1) * ((x ^ 2 - P ^ 2) / (x + 1))) := by ring _ = 1 / 6 * ((x ^ 2 - P ^ 2) + 8 * (P + 1) * ((x ^ 2 - P ^ 2) / (x + P + 2)) + (P + 1) * ((x ^ 2 - P ^ 2) / (x + 1))) := by rw [h1, mul_one] linarith [hterm] rw [hrew] have ht1 : HasDerivAt (fun x => x * (P * (L + 1 - (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P)))) (P * (L + 1 - (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P))) E := ((hasDerivAt_id' E).mul_const _).congr_deriv (by ring) have hsq : HasDerivAt (fun x => x ^ 2 - P ^ 2) (2 * E) E := (((hasDerivAt_id' E).pow 2).sub_const (P ^ 2)).congr_deriv (by ring) have hq1 : HasDerivAt (fun x => (x ^ 2 - P ^ 2) / (x + P + 2)) ((E ^ 2 + 2 * E * P + 4 * E + P ^ 2) / (E + P + 2) ^ 2) E := by have hd := ((hasDerivAt_id' E).add_const P).add_const 2 exact (hsq.div hd hEP2).congr_deriv (by field_simp; ring) have hq2 : HasDerivAt (fun x => (x ^ 2 - P ^ 2) / (x + 1)) ((E ^ 2 + 2 * E + P ^ 2) / (E + 1) ^ 2) E := by have hd := (hasDerivAt_id' E).add_const 1 exact (hsq.div hd hE1).congr_deriv (by field_simp; ring) exact ((ht1.sub_const (P ^ 2)).sub (((hsq.add (hq1.const_mul (8 * (P + 1)))).add (hq2.const_mul (P + 1))).const_mul (1 / 6))).congr_deriv (by ring) apply antitoneOn_of_deriv_nonpos (convex_Ici (Real.exp L)) · exact fun E hE => (hderiv E hE).continuousAt.continuousWithinAt · intro E hE; rw [interior_Ici] at hE exact (hderiv E (le_of_lt hE)).differentiableAt.differentiableWithinAt · intro E hE rw [interior_Ici] at hE have hE' : Real.exp L < E := hE rw [(hderiv E (le_of_lt hE')).deriv] have hEP : P ≤ E := le_trans hP_lt_E (le_of_lt hE') have hEP2_pos : 0 < E + P + 2 := by linarith have hE1_pos : 0 < E + 1 := by linarith have hf1 : P / (P + 1) ≤ (E ^ 2 + 2 * E * P + 4 * E + P ^ 2) / (E + P + 2) ^ 2 := by rw [div_le_div_iff₀ (by linarith) (sq_pos_of_pos hEP2_pos)] have : (E ^ 2 + 2 * E * P + 4 * E + P ^ 2) * (P + 1) - P * (E + P + 2) ^ 2 = (E - P) * (E + 3 * P + 4) := by ring nlinarith have hf2 : 1 ≤ (E ^ 2 + 2 * E + P ^ 2) / (E + 1) ^ 2 := by rw [one_le_div (sq_pos_of_pos hE1_pos)] nlinarith have hE_lo : 1 + L + L ^ 2 / 2 + L ^ 3 / 6 ≤ E := le_trans (taylor3_le_exp (le_of_lt hL0)) (le_of_lt hE') suffices hcore : P * (L + 1 - (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P)) ≤ (2 * (1 + L + L ^ 2 / 2 + L ^ 3 / 6) + 9 * P + 1) / 6 by have h8 : 8 * P ≤ 8 * (P + 1) * ((E ^ 2 + 2 * E * P + 4 * E + P ^ 2) / (E + P + 2) ^ 2) := by have := mul_le_mul_of_nonneg_left hf1 (by linarith : 0 ≤ 8 * (P + 1)) have hcancel : 8 * (P + 1) * (P / (P + 1)) = 8 * P := by field_simp [show P + 1 ≠ 0 by linarith] linarith have h9 : P + 1 ≤ (P + 1) * ((E ^ 2 + 2 * E + P ^ 2) / (E + 1) ^ 2) := by nlinarith linarith have hdiff_id : (2 * (1 + L + L ^ 2 / 2 + L ^ 3 / 6) + 9 * P + 1) / 6 - P * (L + 1 - (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P)) = (1179648 + 1572864 * L + 1148928 * L ^ 2 + 326656 * L ^ 3 - 15136 * L ^ 4 - 41832 * L ^ 5 - 8545 * L ^ 6 + 3328 * L ^ 7) / (4608 * (L + 2) ^ 2 * (13 * L ^ 2 + 40 * L + 64)) := by have hd1 : (L + 2 : ℝ) ≠ 0 := by linarith have hd2 : (13 * L ^ 2 + 24 * L + 32 : ℝ) ≠ 0 := by nlinarith have hd3 : (13 * L ^ 2 + 40 * L + 64 : ℝ) ≠ 0 := by nlinarith have hP1_eq : P + 1 = (13 * L ^ 2 + 40 * L + 64) / (16 * (L + 2)) := by simp only [P, rationalP1]; field_simp; ring rw [hP1_eq] simp only [P, rationalP1] field_simp ring have hnum_nn : 0 ≤ 1179648 + 1572864 * L + 1148928 * L ^ 2 + 326656 * L ^ 3 - 15136 * L ^ 4 - 41832 * L ^ 5 - 8545 * L ^ 6 + 3328 * L ^ 7 := by have h7 : 0 ≤ 3328 * L ^ 7 := by positivity have hL2 : L ^ 2 ≤ (11 / 5) * L := by nlinarith have hL3 : L ^ 3 ≤ (121 / 25) * L := by nlinarith have hL4 : L ^ 4 ≤ (121 / 25) * L ^ 2 := by nlinarith have hL5 : L ^ 5 ≤ (1331 / 125) * L ^ 2 := by nlinarith have hL6 : L ^ 6 ≤ (14641 / 625) * L ^ 2 := by nlinarith nlinarith [sq_nonneg L] have hden_pos : 0 < 4608 * (L + 2) ^ 2 * (13 * L ^ 2 + 40 * L + 64) := by positivity have hq_nn : 0 ≤ (1179648 + 1572864 * L + 1148928 * L ^ 2 + 326656 * L ^ 3 - 15136 * L ^ 4 - 41832 * L ^ 5 - 8545 * L ^ 6 + 3328 * L ^ 7) / (4608 * (L + 2) ^ 2 * (13 * L ^ 2 + 40 * L + 64)) := div_nonneg hnum_nn (le_of_lt hden_pos) linarith /-- Degree-22 Möbius positivity certificate for `0 < L < 11/5` (`L = (11/5) u / (1 + u)`). -/ lemma mobius_small_poly_nonneg {u : ℝ} (hu : 0 < u) : 0 ≤ 2048623902720000 * (11 / 5 * u / (1 + u)) ^ 4 + 1353943351296000 * (11 / 5 * u / (1 + u)) ^ 5 + 1127737589760000 * (11 / 5 * u / (1 + u)) ^ 6 + 122159781642240 * (11 / 5 * u / (1 + u)) ^ 7 - 18289823956992 * (11 / 5 * u / (1 + u)) ^ 8 - 60177673574400 * (11 / 5 * u / (1 + u)) ^ 9 - 10765567329024 * (11 / 5 * u / (1 + u)) ^ 10 - 4405610781696 * (11 / 5 * u / (1 + u)) ^ 11 - 1386460689152 * (11 / 5 * u / (1 + u)) ^ 12 - 337091780864 * (11 / 5 * u / (1 + u)) ^ 13 - 107650932000 * (11 / 5 * u / (1 + u)) ^ 14 + 78423286016 * (11 / 5 * u / (1 + u)) ^ 15 - 45342222736 * (11 / 5 * u / (1 + u)) ^ 16 + 11244681576 * (11 / 5 * u / (1 + u)) ^ 17 - 1513899283 * (11 / 5 * u / (1 + u)) ^ 18 + 106282748 * (11 / 5 * u / (1 + u)) ^ 19 + 31755438 * (11 / 5 * u / (1 + u)) ^ 20 - 6740396 * (11 / 5 * u / (1 + u)) ^ 21 + 371293 * (11 / 5 * u / (1 + u)) ^ 22 := by set w := 1 + u have hw : w ≠ 0 := by simp only [w]; linarith have hw_pos : 0 < w := by simp only [w]; linarith have hmob : 2048623902720000 * (11 / 5 * u / w) ^ 4 + 1353943351296000 * (11 / 5 * u / w) ^ 5 + 1127737589760000 * (11 / 5 * u / w) ^ 6 + 122159781642240 * (11 / 5 * u / w) ^ 7 - 18289823956992 * (11 / 5 * u / w) ^ 8 - 60177673574400 * (11 / 5 * u / w) ^ 9 - 10765567329024 * (11 / 5 * u / w) ^ 10 - 4405610781696 * (11 / 5 * u / w) ^ 11 - 1386460689152 * (11 / 5 * u / w) ^ 12 - 337091780864 * (11 / 5 * u / w) ^ 13 - 107650932000 * (11 / 5 * u / w) ^ 14 + 78423286016 * (11 / 5 * u / w) ^ 15 - 45342222736 * (11 / 5 * u / w) ^ 16 + 11244681576 * (11 / 5 * u / w) ^ 17 - 1513899283 * (11 / 5 * u / w) ^ 18 + 106282748 * (11 / 5 * u / w) ^ 19 + 31755438 * (11 / 5 * u / w) ^ 20 - 6740396 * (11 / 5 * u / w) ^ 21 + 371293 * (11 / 5 * u / w) ^ 22 = (114417658080000000000000000000000 * u ^ 4 + 2225879792056800000000000000000000 * u ^ 5 + 20638903401200700000000000000000000 * u ^ 6 + 120940260269249096280000000000000000 * u ^ 7 + 500891791409363237429700000000000000 * u ^ 8 + 1554107032812214801289737500000000000 * u ^ 9 + 3736879217627113276618838812500000000 * u ^ 10 + 7107766782749082527317617300000000000 * u ^ 11 + 10822777402529112275101297907500000000 * u ^ 12 + 13267745116815655406986670355500000000 * u ^ 13 + 13101052945596697778146476466687500000 * u ^ 14 + 10371972552733691622481623947720000000 * u ^ 15 + 6516206478462799273013220221719750000 * u ^ 16 + 3192235408463509950394129657395675000 * u ^ 17 + 1185835736670425726160178271302048125 * u ^ 18 + 319386788176199527224941070532401000 * u ^ 19 + 57798507610770578484239338860040200 * u ^ 20 + 6072612237474287568292951820097120 * u ^ 21 + 257063307842202676957187447128848 * u ^ 22) / (2384185791015625 * w ^ 22) := by field_simp [hw] simp only [w] ring rw [hmob] positivity /-- Exact rational formula for `simpsonMarginNL L E_hi` (atomic-denominator clearing). -/ lemma simpsonMarginNL_pade23_eq {L : ℝ} (hL0 : 0 < L) (hL1 : L < 11 / 5) : simpsonMarginNL L ((60 + 24 * L + 3 * L ^ 2) / (60 - 36 * L + 9 * L ^ 2 - L ^ 3)) = (2048623902720000 * L ^ 4 + 1353943351296000 * L ^ 5 + 1127737589760000 * L ^ 6 + 122159781642240 * L ^ 7 - 18289823956992 * L ^ 8 - 60177673574400 * L ^ 9 - 10765567329024 * L ^ 10 - 4405610781696 * L ^ 11 - 1386460689152 * L ^ 12 - 337091780864 * L ^ 13 - 107650932000 * L ^ 14 + 78423286016 * L ^ 15 - 45342222736 * L ^ 16 + 11244681576 * L ^ 17 - 1513899283 * L ^ 18 + 106282748 * L ^ 19 + 31755438 * L ^ 20 - 6740396 * L ^ 21 + 371293 * L ^ 22) / (24576 * (L + 2) ^ 3 * (13 * L ^ 2 + 40 * L + 64) * (120 - 12 * L + 12 * L ^ 2 - L ^ 3) * (60 - 36 * L + 9 * L ^ 2 - L ^ 3) ^ 2 * (7680 + 1632 * L + 108 * L ^ 2 - 12 * L ^ 3 + 61 * L ^ 4 - 13 * L ^ 5)) := by set d1 := L + 2 set d2 := 13 * L ^ 2 + 24 * L + 32 set d3 := 13 * L ^ 2 + 40 * L + 64 set d4 := 60 - 36 * L + 9 * L ^ 2 - L ^ 3 set d5 := 120 - 12 * L + 12 * L ^ 2 - L ^ 3 set d6 := 7680 + 1632 * L + 108 * L ^ 2 - 12 * L ^ 3 + 61 * L ^ 4 - 13 * L ^ 5 set nE := 60 + 24 * L + 3 * L ^ 2 have hd1 : d1 ≠ 0 := by simp only [d1]; linarith have hd2 : d2 ≠ 0 := by simp only [d2]; nlinarith have hd3 : d3 ≠ 0 := by simp only [d3]; nlinarith have hd4 : d4 ≠ 0 := by have : 0 < d4 := by simp only [d4]; nlinarith [sq_nonneg (L - 2), sq_nonneg L] exact ne_of_gt this have hd5 : d5 ≠ 0 := by have : 0 < d5 := by simp only [d5]; nlinarith [sq_nonneg (L - 2), sq_nonneg L] exact ne_of_gt this have hd6 : d6 ≠ 0 := by have : 0 < d6 := by simp only [d6] have hL2 : L ^ 2 ≤ (11 / 5) * L := by nlinarith have hL3 : L ^ 3 ≤ (121 / 25) * L := by nlinarith have hL4 : L ^ 4 ≤ (1331 / 125) * L := by nlinarith have hL5 : L ^ 5 ≤ (14641 / 625) * L := by nlinarith nlinarith exact ne_of_gt this set P := rationalP1 L set E_hi := nE / d4 have hP_eq : P = d2 / (16 * d1) := rfl have hP1_eq : P + 1 = d3 / (16 * d1) := by rw [hP_eq, div_add_one (mul_ne_zero (by norm_num) hd1)] congr 1; simp only [d1, d2, d3]; ring have hE1_eq : E_hi + 1 = d5 / d4 := by simp only [E_hi]; rw [div_add_one hd4] congr 1; simp only [nE, d4, d5]; ring have hEP2_eq : E_hi + P + 2 = d6 / (16 * d1 * d4) := by have : E_hi + P + 2 = (E_hi + 1) + (P + 1) := by ring rw [this, hE1_eq, hP1_eq, div_add_div _ _ hd4 (mul_ne_zero (by norm_num) hd1)] have hmul : d4 * (16 * d1) = 16 * d1 * d4 := by ring rw [hmul]; congr 1; simp only [d1, d3, d4, d5, d6]; ring have hA : E_hi * P * (L + 1 - (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P)) - P ^ 2 = (4394 * L ^ 9 + 4225 * L ^ 8 + 202904 * L ^ 7 + 1419780 * L ^ 6 + 5670752 * L ^ 5 + 13385728 * L ^ 4 + 21551104 * L ^ 3 + 20692992 * L ^ 2 + 11796480 * L) / (512 * d1 ^ 2 * d3 * d4) := by rw [hP1_eq, hP_eq] simp only [E_hi] field_simp [hd1, hd2, hd3, hd4] simp only [d1, d2, d3, d4, nE] ring have hB : (E_hi + P) * (P + 1) * ((E_hi - P) / 6 * (1 / (P + 1) + 8 / (E_hi + P + 2) + 1 / (E_hi + 1))) = (-28561 * L ^ 20 + 395460 * L ^ 19 + 1275274 * L ^ 18 - 62023260 * L ^ 17 + 626553807 * L ^ 16 - 3536019168 * L ^ 15 + 12846528784 * L ^ 14 - 30596392704 * L ^ 13 + 37510015136 * L ^ 12 - 43594679808 * L ^ 11 + 38110360320 * L ^ 10 - 547297170432 * L ^ 9 + 382615564032 * L ^ 8 + 4277840117760 * L ^ 7 - 5470450532352 * L ^ 6 + 64337375526912 * L ^ 5 + 269253051678720 * L ^ 4 + 845116814131200 * L ^ 3 + 1117060595712000 * L ^ 2 + 978447237120000 * L) / (24576 * d1 ^ 3 * d5 * d4 ^ 2 * d6) := by rw [hP1_eq, hE1_eq, hEP2_eq, hP_eq] simp only [E_hi] field_simp [hd1, hd3, hd4, hd5, hd6] simp only [d1, d2, d3, d4, d5, d6, nE] ring unfold simpsonMarginNL dsimp only change (E_hi * P * (L + 1 - (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P)) - P ^ 2) - (E_hi + P) * (P + 1) * ((E_hi - P) / 6 * (1 / (P + 1) + 8 / (E_hi + P + 2) + 1 / (E_hi + 1))) = _ / (24576 * d1 ^ 3 * d3 * d5 * d4 ^ 2 * d6) rw [hA, hB] field_simp [hd1, hd3, hd4, hd5, hd6] simp only [d1, d3, d4, d5, d6] ring /-- **Regime 1 (`0 < L < 11/5`):** Exact zero-negative-coefficient Möbius certificate proving `onePointMargin L (scaleD L) ≥ 0`. -/ theorem onePointMargin_scaleD_nonneg_small {L : ℝ} (hL0 : 0 < L) (hL1 : L < 11 / 5) : 0 ≤ onePointMargin L (scaleD L) := by have hP1_ge1 : 1 ≤ rationalP1 L := rationalP1_ge_one (le_of_lt hL0) have hP1_le_D : rationalP1 L ≤ scaleD L := rationalP1_le_scaleD (le_of_lt hL0) have hD_sq : scaleD L ^ 2 ≤ Real.exp L := le_of_lt (scaleD_sq_lt_exp hL0) apply onePointMargin_monotone_in_D hL0 hP1_ge1 hP1_le_D hD_sq set P := rationalP1 L set E := Real.exp L have hP_pos : 0 < P := by linarith have hP_le_E : P ≤ E := by have h1 := scaleD_lt_exp_half hL0 have h2 : Real.exp (L / 2) ≤ Real.exp L := Real.exp_le_exp.mpr (by linarith) linarith have hlogP : Real.log P ≤ (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P) := log_le_simpson_one hP1_ge1 have hlogEP : Real.log (E + 1) - Real.log (P + 1) ≤ (E - P) / 6 * (1 / (P + 1) + 8 / (E + P + 2) + 1 / (E + 1)) := by have h := log_div_le_simpson (a := P + 1) (b := E + 1) (by linarith) (by linarith) rw [Real.log_div (by positivity) (by linarith)] at h convert h using 1; ring_nf have hstep1 : simpsonMarginNL L E ≤ onePointMargin L P := by unfold simpsonMarginNL onePointMargin have hEP : 0 ≤ E * P := by positivity have hfac : 0 ≤ (E + P) * (P + 1) := by positivity have h1 : E * P * (L + 1 - (P - 1) / 6 * (1 + 8 / (P + 1) + 1 / P)) ≤ E * P * (L + 1 - Real.log P) := by apply mul_le_mul_of_nonneg_left _ hEP; linarith have h2 : (E + P) * (P + 1) * (Real.log (E + 1) - Real.log (P + 1)) ≤ (E + P) * (P + 1) * ((E - P) / 6 * (1 / (P + 1) + 8 / (E + P + 2) + 1 / (E + 1))) := mul_le_mul_of_nonneg_left hlogEP hfac linarith set E_hi := (60 + 24 * L + 3 * L ^ 2) / (60 - 36 * L + 9 * L ^ 2 - L ^ 3) have hE_le : E ≤ E_hi := exp_le_pade23 (le_of_lt hL0) (le_of_lt hL1) have hstep2 : simpsonMarginNL L E_hi ≤ simpsonMarginNL L E := simpsonMarginNL_antitone_in_E hL0 (le_of_lt hL1) Set.self_mem_Ici hE_le hE_le suffices hstep3 : 0 ≤ simpsonMarginNL L E_hi by linarith rw [simpsonMarginNL_pade23_eq hL0 hL1] have hden_a : 0 < 60 - 36 * L + 9 * L ^ 2 - L ^ 3 := by nlinarith [sq_nonneg (L - 2), sq_nonneg L] have hden_b : 0 < 120 - 12 * L + 12 * L ^ 2 - L ^ 3 := by nlinarith [sq_nonneg (L - 2), sq_nonneg L] have hden_c : 0 < 7680 + 1632 * L + 108 * L ^ 2 - 12 * L ^ 3 + 61 * L ^ 4 - 13 * L ^ 5 := by have hL2 : L ^ 2 ≤ (11 / 5) * L := by nlinarith have hL3 : L ^ 3 ≤ (121 / 25) * L := by nlinarith have hL4 : L ^ 4 ≤ (1331 / 125) * L := by nlinarith have hL5 : L ^ 5 ≤ (14641 / 625) * L := by nlinarith nlinarith apply div_nonneg · set u := L / (11 / 5 - L) have hu : 0 < u := div_pos hL0 (by linarith) have hL_eq : L = 11 / 5 * u / (1 + u) := by have h5 : (11 / 5 - L : ℝ) ≠ 0 := by linarith have h1u : 1 + u = (11 / 5) / (11 / 5 - L) := by simp only [u]; rw [one_add_div h5]; ring rw [h1u]; simp only [u] rw [mul_div_assoc, div_div_div_cancel_right₀ h5] ring rw [hL_eq] exact mobius_small_poly_nonneg hu · positivity /-- **Regime 2 (`L ≥ 11/5`):** Exact zero-negative-coefficient shifted polynomial certificate proving `onePointMargin L (scaleD L) ≥ 0`. -/ theorem onePointMargin_scaleD_nonneg_large {L : ℝ} (hL : 11 / 5 ≤ L) : 0 ≤ onePointMargin L (scaleD L) := by have hL0 : 0 ≤ L := by linarith set D := scaleD L set E := Real.exp L have hE_pos : 0 < E := Real.exp_pos L have hD_ge2 : 2 ≤ D := by have h1 := rationalP1_le_scaleD hL0 have h2 : 2 ≤ rationalP1 L := by unfold rationalP1 rw [le_div_iff₀ (by linarith)] nlinarith linarith have hD_le_U2 : D ≤ rationalU2 L := scaleD_le_rationalU2 hL0 have hlogE1 : Real.log (E + 1) = L + Real.log (1 + 1 / E) := by have : E + 1 = E * (1 + 1 / E) := by field_simp [ne_of_gt hE_pos] rw [this, Real.log_mul (ne_of_gt hE_pos) (by positivity), Real.log_exp] have hlog_invE : Real.log (1 + 1 / E) ≤ 1 / E := by have := Real.log_le_sub_one_of_pos (by positivity : 0 < 1 + 1 / E); linarith have hlog_D1_ge : 1 / 9 ≤ Real.log (D + 1) - Real.log (1 + 3 / 4 * L) := by have h98 := nine_eighths_le_scaleD_add_one hL0 have h1 : Real.log (9 / 8) ≤ Real.log ((D + 1) / (1 + 3 / 4 * L)) := by apply Real.log_le_log (by norm_num) rw [le_div_iff₀ (by linarith)] linarith have h1_div : Real.log ((D + 1) / (1 + 3 / 4 * L)) = Real.log (D + 1) - Real.log (1 + 3 / 4 * L) := Real.log_div (by linarith) (by linarith) rw [h1_div] at h1 have h2 : (1 / 9 : ℝ) ≤ Real.log (9 / 8) := by have hp := two_mul_div_two_add_le_log_one_add (x := 1 / 8) (by norm_num) have h98' : (1 + 1 / 8 : ℝ) = 9 / 8 := by norm_num have h19 : (1 / 9 : ℝ) ≤ 2 * (1 / 8) / (2 + 1 / 8) := by norm_num rw [h98'] at hp linarith linarith have hlog_D_step : 4 / 5 ≤ D * (Real.log (D + 1) - Real.log D) := by have h1 : Real.log (D + 1) - Real.log D = Real.log (1 + 1 / D) := by rw [← Real.log_div (by linarith) (by linarith)] congr 1; field_simp [show D ≠ 0 by linarith] rw [h1] have h2 := two_mul_div_two_add_le_log_one_add (x := 1 / D) (by positivity) have h3 : 4 / 5 ≤ D * (2 * (1 / D) / (2 + 1 / D)) := by have hrew : D * (2 * (1 / D) / (2 + 1 / D)) = 2 * D / (2 * D + 1) := by field_simp [show D ≠ 0 by linarith, show (2 : ℝ) + 1 / D ≠ 0 by positivity] rw [hrew, div_le_div_iff₀ (by norm_num) (by linarith)] linarith have h4 : D * (2 * (1 / D) / (2 + 1 / D)) ≤ D * Real.log (1 + 1 / D) := mul_le_mul_of_nonneg_left h2 (by linarith) linarith have hD_def : Real.log (1 + 3 / 4 * L) = 1 + L - D := by simp only [D, scaleD]; ring have hlogD1_sub_L : 10 / 9 - D ≤ Real.log (D + 1) - L := by linarith [hlog_D1_ge, hD_def] have hmargin_lb : 86 / 45 * E - (D ^ 3 + 8 / 9 * D ^ 2 + 7 / 9) - D * (D + 1) / E ≤ onePointMargin L D := by have hid : onePointMargin L D = E * (Real.log (D + 1) - Real.log (1 + 3 / 4 * L) + D * (Real.log (D + 1) - Real.log D) + 1) + D * (D + 1) * (Real.log (D + 1) - L) - D ^ 2 - (E + D) * (D + 1) * Real.log (1 + 1 / E) := by unfold onePointMargin rw [hlogE1, hD_def] ring rw [hid] have h1 : 86 / 45 * E ≤ E * (Real.log (D + 1) - Real.log (1 + 3 / 4 * L) + D * (Real.log (D + 1) - Real.log D) + 1) := by have : (86 / 45 : ℝ) ≤ Real.log (D + 1) - Real.log (1 + 3 / 4 * L) + D * (Real.log (D + 1) - Real.log D) + 1 := by linarith nlinarith have h2 : D * (D + 1) * (10 / 9 - D) ≤ D * (D + 1) * (Real.log (D + 1) - L) := mul_le_mul_of_nonneg_left hlogD1_sub_L (by nlinarith) have h3 : (E + D) * (D + 1) * Real.log (1 + 1 / E) ≤ (D + 1) + D * (D + 1) / E := by have hmul := mul_le_mul_of_nonneg_left hlog_invE (by nlinarith : 0 ≤ (E + D) * (D + 1)) have hrew : (E + D) * (D + 1) * (1 / E) = (D + 1) + D * (D + 1) / E := by field_simp [ne_of_gt hE_pos] linarith nlinarith set U := rationalU2 L set E6 := 1 + L + L ^ 2 / 2 + L ^ 3 / 6 + L ^ 4 / 24 + L ^ 5 / 120 + L ^ 6 / 720 have hE6_le : E6 ≤ E := taylor6_le_exp hL0 have hE6_pos : 0 < E6 := by positivity have hD3_le : D ^ 3 + 8 / 9 * D ^ 2 + 7 / 9 ≤ U ^ 3 + 8 / 9 * U ^ 2 + 7 / 9 := by have h2 : D ^ 2 ≤ U ^ 2 := by nlinarith have h3 : D ^ 3 ≤ U ^ 3 := by nlinarith linarith have hDU_div : D * (D + 1) / E ≤ U * (U + 1) / E6 := by have hnum : D * (D + 1) ≤ U * (U + 1) := by nlinarith calc D * (D + 1) / E ≤ U * (U + 1) / E := div_le_div_of_nonneg_right hnum (le_of_lt hE_pos) _ ≤ U * (U + 1) / E6 := div_le_div_of_nonneg_left (by nlinarith) hE6_pos hE6_le suffices hpoly : 0 ≤ 86 / 45 * E6 ^ 2 - (U ^ 3 + 8 / 9 * U ^ 2 + 7 / 9) * E6 - U * (U + 1) by have hdiv := div_nonneg hpoly (le_of_lt hE6_pos) have hrew : (86 / 45 * E6 ^ 2 - (U ^ 3 + 8 / 9 * U ^ 2 + 7 / 9) * E6 - U * (U + 1)) / E6 = 86 / 45 * E6 - (U ^ 3 + 8 / 9 * U ^ 2 + 7 / 9) - U * (U + 1) / E6 := by field_simp [ne_of_gt hE6_pos] rw [hrew] at hdiv linarith set t := L - 11 / 5 have ht : 0 ≤ t := sub_nonneg.mpr hL have hLt : L = 11 / 5 + t := by simp only [t]; ring have hden_pos : 0 < 75 * t ^ 2 + 930 * t + 2483 := by positivity have hshift : 86 / 45 * E6 ^ 2 - (U ^ 3 + 8 / 9 * U ^ 2 + 7 / 9) * E6 - U * (U + 1) = (12165443146728922087201721 + 1398757188317770360149924090 * t + 4160707150934451035016992325 * t ^ 2 + 6138601858620583885124522000 * t ^ 3 + 5883587690576529316316850000 * t ^ 4 + 4071097916066456945330400000 * t ^ 5 + 2146450980042546972501000000 * t ^ 6 + 889554498690961382636250000 * t ^ 7 + 295166572193780671928906250 * t ^ 8 + 79202088437228035976562500 * t ^ 9 + 17244090634874144707031250 * t ^ 10 + 3038607326826827343750000 * t ^ 11 + 429701878977974609375000 * t ^ 12 + 48032369510800781250000 * t ^ 13 + 4143785583251953125000 * t ^ 14 + 265848130371093750000 * t ^ 15 + 11935432891845703125 * t ^ 16 + 334822082519531250 * t ^ 17 + 4428863525390625 * t ^ 18) / (2847656250000000 * (75 * t ^ 2 + 930 * t + 2483) ^ 3) := by simp only [E6, U, rationalU2] rw [hLt] have hd1 : (32 + 24 * (11 / 5 + t) + 3 * (11 / 5 + t) ^ 2 : ℝ) ≠ 0 := by nlinarith have hd2 : (75 * t ^ 2 + 930 * t + 2483 : ℝ) ≠ 0 := ne_of_gt hden_pos field_simp ring rw [hshift] positivity /-- **Global Positivity of the Critical One-Point Margin:** `onePointMargin L (scaleD L) ≥ 0` for ALL `L > 0`. -/ theorem onePointMargin_scaleD_nonneg {L : ℝ} (hL : 0 < L) : 0 ≤ onePointMargin L (scaleD L) := by by_cases h : L < 11 / 5 · exact onePointMargin_scaleD_nonneg_small hL h · push Not at h exact onePointMargin_scaleD_nonneg_large h /-- **HEADLINE THEOREM 1 — Sharp Closed-Form Two-Point MLSI Lower Bound (All `p ∈ (0, 1)`):** For all `p ∈ (0, 1)` and all `a, b > 0`, `sharpMLSILower p * Ent_{μ_p}(a, b) ≤ E_{μ_p}(f, log f)`. -/ theorem mlsi_ge_sharp_log {p a b : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ha : 0 < a) (hb : 0 < b) : sharpMLSILower p * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b := by unfold sharpMLSILower split_ifs with heq hlt · subst heq exact mlsi_half_ge_two ha hb · have hL : 0 < Real.log ((1 - p) / p) := Real.log_pos (by rw [one_lt_div hp0]; linarith) have hD1 : 1 ≤ scaleD (Real.log ((1 - p) / p)) := le_of_lt (one_lt_scaleD hL) have hDsq : scaleD (Real.log ((1 - p) / p)) ^ 2 ≤ (1 - p) / p := by have h := scaleD_sq_lt_exp hL rw [Real.exp_log (div_pos (by linarith) hp0)] at h exact le_of_lt h exact mlsi_ge_of_onePoint_margin hp0 hlt hD1 hDsq (onePointMargin_scaleD_nonneg hL) ha hb · have hgt : 1 / 2 < p := lt_of_le_of_ne (not_lt.mp hlt) (Ne.symm heq) have hq0 : 0 < 1 - p := by linarith have hq1 : 1 - p < 1 / 2 := by linarith have hL : 0 < Real.log (p / (1 - p)) := Real.log_pos (by rw [one_lt_div hq0]; linarith) have hD1 : 1 ≤ scaleD (Real.log (p / (1 - p))) := le_of_lt (one_lt_scaleD hL) have hDsq : scaleD (Real.log (p / (1 - p))) ^ 2 ≤ p / (1 - p) := by have h := scaleD_sq_lt_exp hL rw [Real.exp_log (div_pos hp0 hq0)] at h exact le_of_lt h have hmain := mlsi_ge_of_onePoint_margin (p := 1 - p) hq0 hq1 hD1 (by simpa [sub_sub_cancel] using hDsq) (by simpa [sub_sub_cancel] using onePointMargin_scaleD_nonneg hL) hb ha rw [bernoulliEnt_symm, bernoulliDirichletLog_symm] at hmain simpa [sub_sub_cancel] using hmain /-- **HEADLINE THEOREM 2 — Strictly Beats Erbar–Maas (2012) / Mielke (2013) EVERYWHERE:** For EVERY `p ∈ (0, 1) \ {1/2}`, `1 + 2 √(p (1 - p)) < sharpMLSILower p`. -/ theorem sharp_log_gt_erbarMaas {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hp_ne : p ≠ 1 / 2) : 1 + 2 * Real.sqrt (p * (1 - p)) < sharpMLSILower p := by have helper : ∀ r : ℝ, 0 < r → r < 1 / 2 → 1 + 2 * Real.sqrt (r * (1 - r)) < 1 + (1 - r) / scaleD (Real.log ((1 - r) / r)) + r * scaleD (Real.log ((1 - r) / r)) := by intro r hr0 hr1 set L := Real.log ((1 - r) / r) have hL : 0 < L := Real.log_pos (by rw [one_lt_div hr0]; linarith) set D := scaleD L have hD0 : 0 < D := lt_trans zero_lt_one (one_lt_scaleD hL) have hDsq : D ^ 2 < (1 - r) / r := by have h := scaleD_sq_lt_exp hL rwa [Real.exp_log (div_pos (by linarith) hr0)] at h have hne : Real.sqrt (r * D) ≠ Real.sqrt ((1 - r) / D) := by intro heq have hsq : r * D = (1 - r) / D := by have := congrArg (· ^ 2) heq rwa [Real.sq_sqrt (by positivity), Real.sq_sqrt (div_nonneg (by linarith) (le_of_lt hD0))] at this have : r * D ^ 2 = 1 - r := by have := congrArg (· * D) hsq field_simp [ne_of_gt hD0] at this linarith have hlt' : r * D ^ 2 < 1 - r := by have := mul_lt_mul_of_pos_left hDsq hr0 rwa [mul_div_cancel₀ (1 - r) (ne_of_gt hr0)] at this linarith have hpos_sq : 0 < (Real.sqrt (r * D) - Real.sqrt ((1 - r) / D)) ^ 2 := sq_pos_of_ne_zero (sub_ne_zero.mpr hne) have hprod : Real.sqrt (r * D) * Real.sqrt ((1 - r) / D) = Real.sqrt (r * (1 - r)) := by rw [← Real.sqrt_mul (by positivity)] congr 1 field_simp [ne_of_gt hD0] have hsq1 : Real.sqrt (r * D) ^ 2 = r * D := Real.sq_sqrt (by positivity) have hsq2 : Real.sqrt ((1 - r) / D) ^ 2 = (1 - r) / D := Real.sq_sqrt (div_nonneg (by linarith) (le_of_lt hD0)) nlinarith unfold sharpMLSILower rw [if_neg hp_ne] split_ifs with hlt · exact helper p hp0 hlt · have hgt : 1 / 2 < p := lt_of_le_of_ne (not_lt.mp hlt) (Ne.symm hp_ne) have h := helper (1 - p) (by linarith) (by linarith) have hsub : 1 - (1 - p) = p := by ring have hmul : (1 - p) * p = p * (1 - p) := by ring rwa [hsub, hmul] at h /-- **HEADLINE THEOREM 3 — Unbounded Asymptotic Gain Over Erbar–Maas as `p → 0⁺`:** For every `C > 0`, there exists `p ∈ (0, 1/2)` such that the excess above `1` of our bound exceeds `C` times the Erbar–Maas excess `2 √(p (1 - p))`! -/ theorem sharp_log_excess_unbounded_over_erbarMaas (C : ℝ) : ∃ p : ℝ, 0 < p ∧ p < 1 / 2 ∧ C * (2 * Real.sqrt (p * (1 - p))) < sharpMLSILower p - 1 := by set M := max C 1 have hM : 1 ≤ M := le_max_right C 1 set L := 128 * M have hL : 128 ≤ L := by linarith have hL0 : 0 < L := by linarith set E := Real.exp L have hE : 1 < E := Real.one_lt_exp_iff.mpr hL0 set p := 1 / (E + 1) have hp0 : 0 < p := by positivity have hp1 : p < 1 / 2 := by simp only [p]; rw [div_lt_div_iff₀ (by linarith) (by norm_num)]; linarith refine ⟨p, hp0, hp1, ?_⟩ have hqp : (1 - p) / p = E := by simp only [p]; field_simp [show E + 1 ≠ 0 by linarith]; ring have hlog : Real.log ((1 - p) / p) = L := by rw [hqp, Real.log_exp] have hsharp : sharpMLSILower p = 1 + (1 - p) / scaleD L + p * scaleD L := by unfold sharpMLSILower rw [if_neg (ne_of_lt hp1), if_pos hp1, hlog] rw [hsharp] have hD_pos : 0 < scaleD L := lt_trans zero_lt_one (one_lt_scaleD hL0) have hD_le : scaleD L ≤ 2 * L := by unfold scaleD have hln : 0 ≤ Real.log (1 + 3 / 4 * L) := Real.log_nonneg (by linarith) linarith have hq_ge : 1 / 2 ≤ 1 - p := by linarith have hlb : 1 / (4 * L) ≤ (1 - p) / scaleD L + p * scaleD L := by have h1 : 1 / (4 * L) ≤ (1 - p) / scaleD L := by rw [div_le_div_iff₀ (by linarith) hD_pos] nlinarith have h2 : 0 ≤ p * scaleD L := by positivity linarith have hsq_le : 2 * Real.sqrt (p * (1 - p)) ≤ 16 / L ^ 2 := by have hpq : p * (1 - p) ≤ 1 / E := by simp only [p] rw [show 1 - 1 / (E + 1) = E / (E + 1) by field_simp [show E + 1 ≠ 0 by linarith]; ring] rw [div_mul_div_comm, one_mul, div_le_div_iff₀ (by positivity) (by positivity)] nlinarith have hsqrt_E : Real.sqrt (1 / E) = 1 / Real.exp (L / 2) := by rw [Real.sqrt_div zero_le_one, Real.sqrt_one] congr 1 have : E = Real.exp (L / 2) ^ 2 := by rw [sq, ← Real.exp_add, add_halves] rw [this, Real.sqrt_sq (le_of_lt (Real.exp_pos (L / 2)))] have h1 : Real.sqrt (p * (1 - p)) ≤ 1 / Real.exp (L / 2) := by rw [← hsqrt_E]; exact Real.sqrt_le_sqrt hpq have h2 : L ^ 2 / 8 ≤ Real.exp (L / 2) := by have := Real.sum_le_exp_of_nonneg (show 0 ≤ L / 2 by linarith) 3 simp only [Finset.sum_range_succ, Finset.range_zero, Finset.sum_empty, Nat.factorial] at this nlinarith have h3 : 1 / Real.exp (L / 2) ≤ 8 / L ^ 2 := by rw [div_le_div_iff₀ (Real.exp_pos _) (by positivity)] linarith have h28 : 2 * (8 / L ^ 2) = 16 / L ^ 2 := by ring linarith have hCM : C ≤ M := le_max_left C 1 have hmul : C * (2 * Real.sqrt (p * (1 - p))) ≤ M * (16 / L ^ 2) := by calc C * (2 * Real.sqrt (p * (1 - p))) ≤ M * (2 * Real.sqrt (p * (1 - p))) := mul_le_mul_of_nonneg_right hCM (by positivity) _ ≤ M * (16 / L ^ 2) := mul_le_mul_of_nonneg_left hsq_le (by linarith) have hgap : M * (16 / L ^ 2) < 1 / (4 * L) := by rw [show M * (16 / L ^ 2) = 16 * M / L ^ 2 by ring] rw [div_lt_div_iff₀ (by positivity) (by positivity)] have hML : 16 * M * (4 * L) < 1 * L ^ 2 := by have : L = 128 * M := rfl rw [this] nlinarith linarith linarith /-- Explicit second-order logarithmic lower bound for all `p ∈ (0, 1/2)`: `1 + (1 - p) / (1 + L - log(1 + (3/4) L)) < sharpMLSILower p`. -/ theorem sharp_log_second_order_lb {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1 / 2) : 1 + (1 - p) / (1 + Real.log ((1 - p) / p) - Real.log (1 + 3 / 4 * Real.log ((1 - p) / p))) < sharpMLSILower p := by unfold sharpMLSILower scaleD rw [if_neg (ne_of_lt hp1), if_pos hp1] have hL : 0 < Real.log ((1 - p) / p) := Real.log_pos (by rw [one_lt_div hp0]; linarith) have hD : 0 < 1 + Real.log ((1 - p) / p) - Real.log (1 + 3 / 4 * Real.log ((1 - p) / p)) := lt_trans zero_lt_one (one_lt_scaleD hL) nlinarith /-! ## Section 5: Sharp Closed-Form Upper Bounds & Complete Two-Sided Sandwich -/ /-- Exact Diaconis–Saloff-Coste (1996) standard Log-Sobolev constant `α_LS(p)`. -/ def alphaLS (p : ℝ) : ℝ := if p = 1 / 2 then 1 else 2 * (1 - 2 * p) / Real.log ((1 - p) / p) /-- Sharp closed-form MLSI upper bound obtained from the ratio witness `t = (1 - p) / p`: `U_DSC(p) = (1 - 2 p) log((1 - p) / p) / log(1 / (4 p (1 - p)))`. -/ def sharpMLSIUpperDSC (p : ℝ) : ℝ := if p = 1 / 2 then 2 else (1 - 2 * p) * Real.log ((1 - p) / p) / Real.log (1 / (4 * p * (1 - p))) /-- Asymptotically exact 2nd-order MLSI upper witness evaluated at `t = (1 - p) / (p D_{3/4}(L))`. -/ def sharpMLSIUpperLog (p : ℝ) : ℝ := if p = 1 / 2 then 2 else if p < 1 / 2 then let t := (1 - p) / (p * scaleD (Real.log ((1 - p) / p))) bernoulliDirichletLog p 1 t / bernoulliEnt p 1 t else let t := p / ((1 - p) * scaleD (Real.log (p / (1 - p)))) bernoulliDirichletLog (1 - p) 1 t / bernoulliEnt (1 - p) 1 t /-- Exact evaluation of `E(f, log f) / Ent(f)` at the witness `f = (1, (1 - p)/p)`. -/ theorem mlsi_ratio_at_qp_eq_upperDSC {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hp_ne : p ≠ 1 / 2) : bernoulliDirichletLog p 1 ((1 - p) / p) / bernoulliEnt p 1 ((1 - p) / p) = sharpMLSIUpperDSC p := by have hq : 0 < 1 - p := by linarith have hqp : 0 < (1 - p) / p := div_pos hq hp0 have hmean : bernoulliMean p 1 ((1 - p) / p) = 2 * (1 - p) := by unfold bernoulliMean; field_simp [ne_of_gt hp0]; ring have hnum : bernoulliDirichletLog p 1 ((1 - p) / p) = (1 - p) * (1 - 2 * p) * Real.log ((1 - p) / p) := by unfold bernoulliDirichletLog rw [Real.log_one, sub_zero] field_simp [ne_of_gt hp0] ring have hden : bernoulliEnt p 1 ((1 - p) / p) = (1 - p) * Real.log (1 / (4 * p * (1 - p))) := by unfold bernoulliEnt rw [hmean, Real.log_one, mul_zero, zero_add] have h1 : p * ((1 - p) / p) = 1 - p := mul_div_cancel₀ (1 - p) (ne_of_gt hp0) rw [h1] have hlog : Real.log ((1 - p) / p) - 2 * Real.log (2 * (1 - p)) = Real.log (1 / (4 * p * (1 - p))) := by have h2 : 2 * Real.log (2 * (1 - p)) = Real.log (4 * (1 - p) ^ 2) := by rw [show (4 * (1 - p) ^ 2 : ℝ) = (2 * (1 - p)) ^ 2 by ring, Real.log_pow] push_cast; ring rw [h2, ← Real.log_div (ne_of_gt hqp) (by positivity)] congr 1 field_simp [ne_of_gt hp0, ne_of_gt hq] calc (1 - p) * Real.log ((1 - p) / p) - 2 * (1 - p) * Real.log (2 * (1 - p)) = (1 - p) * (Real.log ((1 - p) / p) - 2 * Real.log (2 * (1 - p))) := by ring _ = (1 - p) * Real.log (1 / (4 * p * (1 - p))) := by rw [hlog] unfold sharpMLSIUpperDSC rw [if_neg hp_ne, hnum, hden] have h1p_ne : (1 - p : ℝ) ≠ 0 := ne_of_gt hq field_simp /-- **HEADLINE THEOREM 4 — Sharp Closed-Form Upper Bound via `t = (1 - p) / p`:** Any valid MLSI constant `ρ` on `{0, 1}_p` satisfies `ρ ≤ sharpMLSIUpperDSC p`. -/ theorem mlsi_le_dsc_witness {p ρ : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hρ : ∀ a b : ℝ, 0 < a → 0 < b → ρ * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b) : ρ ≤ sharpMLSIUpperDSC p := by by_cases heq : p = 1 / 2 · subst heq unfold sharpMLSIUpperDSC; rw [if_pos rfl] exact mlsi_le_two hp0 hp1 hρ · have hq : 0 < 1 - p := by linarith have hqp : 0 < (1 - p) / p := div_pos hq hp0 have hne : (1 : ℝ) ≠ (1 - p) / p := by intro h; rw [eq_div_iff (ne_of_gt hp0)] at h; apply heq; linarith have hent : 0 < bernoulliEnt p 1 ((1 - p) / p) := bernoulliEnt_pos hp0 hp1 zero_lt_one hqp hne have hle := hρ 1 ((1 - p) / p) zero_lt_one hqp rw [← mlsi_ratio_at_qp_eq_upperDSC hp0 hp1 heq, le_div_iff₀ hent] linarith /-- **HEADLINE THEOREM 5 — Sharp Asymptotic 2nd-Order Upper Witness (`t = (1-p)/(p D_{3/4}(L))`):** Any valid MLSI constant `ρ` satisfies `ρ ≤ sharpMLSIUpperLog p`. -/ theorem mlsi_le_log_witness {p ρ : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hρ : ∀ a b : ℝ, 0 < a → 0 < b → ρ * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b) : ρ ≤ sharpMLSIUpperLog p := by unfold sharpMLSIUpperLog split_ifs with heq hlt · subst heq; exact mlsi_le_two hp0 hp1 hρ · have hL : 0 < Real.log ((1 - p) / p) := Real.log_pos (by rw [one_lt_div hp0]; linarith) set D := scaleD (Real.log ((1 - p) / p)) have hD0 : 0 < D := lt_trans zero_lt_one (one_lt_scaleD hL) set t := (1 - p) / (p * D) have ht0 : 0 < t := div_pos (by linarith) (mul_pos hp0 hD0) have hDsq : D ^ 2 < (1 - p) / p := by have h := scaleD_sq_lt_exp hL rwa [Real.exp_log (div_pos (by linarith) hp0)] at h have ht_gt1 : 1 < t := by simp only [t] rw [one_lt_div (mul_pos hp0 hD0)] have hD1 : 1 < D := one_lt_scaleD hL have hmul := mul_lt_mul_of_pos_left hDsq hp0 rw [mul_div_cancel₀ (1 - p) (ne_of_gt hp0)] at hmul nlinarith have hent : 0 < bernoulliEnt p 1 t := bernoulliEnt_pos hp0 hp1 zero_lt_one ht0 (ne_of_lt ht_gt1) rw [le_div_iff₀ hent] exact hρ 1 t zero_lt_one ht0 · have hgt : 1 / 2 < p := lt_of_le_of_ne (not_lt.mp hlt) (Ne.symm heq) have hq0 : 0 < 1 - p := by linarith have hL : 0 < Real.log (p / (1 - p)) := Real.log_pos (by rw [one_lt_div hq0]; linarith) set D := scaleD (Real.log (p / (1 - p))) have hD0 : 0 < D := lt_trans zero_lt_one (one_lt_scaleD hL) set t := p / ((1 - p) * D) have ht0 : 0 < t := div_pos hp0 (mul_pos hq0 hD0) have hDsq : D ^ 2 < p / (1 - p) := by have h := scaleD_sq_lt_exp hL rwa [Real.exp_log (div_pos hp0 hq0)] at h have ht_gt1 : 1 < t := by simp only [t] rw [one_lt_div (mul_pos hq0 hD0)] have hD1 : 1 < D := one_lt_scaleD hL have hmul := mul_lt_mul_of_pos_left hDsq hq0 rw [mul_div_cancel₀ p (ne_of_gt hq0)] at hmul nlinarith have hent : 0 < bernoulliEnt (1 - p) 1 t := bernoulliEnt_pos hq0 (by linarith) zero_lt_one ht0 (ne_of_lt ht_gt1) rw [le_div_iff₀ hent] have hsym := hρ t 1 ht0 zero_lt_one rwa [bernoulliEnt_symm, bernoulliDirichletLog_symm] /-- **HEADLINE THEOREM 6 — Strict Improvement Over `1 + α_LS(p)`:** For EVERY `p ∈ (0, 1) \ {1/2}`, `sharpMLSIUpperDSC p < 1 + alphaLS p < 2`. -/ theorem dsc_witness_lt_one_add_lsi {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hp_ne : p ≠ 1 / 2) : sharpMLSIUpperDSC p < 1 + alphaLS p := by have helper : ∀ r : ℝ, 0 < r → r < 1 / 2 → (1 - 2 * r) * Real.log ((1 - r) / r) / Real.log (1 / (4 * r * (1 - r))) < 1 + 2 * (1 - 2 * r) / Real.log ((1 - r) / r) := by intro r hr0 hr1 set L := Real.log ((1 - r) / r) have hL : 0 < L := Real.log_pos (by rw [one_lt_div hr0]; linarith) set t := L / 2 have ht : 0 < t := by dsimp [t]; linarith have hE : Real.exp L = (1 - r) / r := Real.exp_log (div_pos (by linarith) hr0) have hEt : Real.exp t ^ 2 = (1 - r) / r := by rw [sq, ← Real.exp_add]; simp only [t, add_halves, hE] have hrq_pos : 0 < r * (1 - r) := mul_pos hr0 (by linarith) have hsrq_pos : 0 < Real.sqrt (r * (1 - r)) := Real.sqrt_pos.mpr hrq_pos have hsh : Real.sinh t = (1 - 2 * r) / (2 * Real.sqrt (r * (1 - r))) := by rw [Real.sinh_eq, Real.exp_neg] have hsq : Real.exp t = Real.sqrt ((1 - r) / r) := by rw [← Real.sqrt_sq (le_of_lt (Real.exp_pos t)), hEt] rw [hsq, Real.sqrt_div (by linarith), Real.sqrt_mul (le_of_lt hr0)] have hsr : 0 < Real.sqrt r := Real.sqrt_pos.mpr hr0 have hsq' : 0 < Real.sqrt (1 - r) := Real.sqrt_pos.mpr (by linarith) field_simp [ne_of_gt hsr, ne_of_gt hsq'] rw [Real.sq_sqrt (by linarith), Real.sq_sqrt (le_of_lt hr0)] ring have hch : Real.cosh t = 1 / (2 * Real.sqrt (r * (1 - r))) := by rw [Real.cosh_eq, Real.exp_neg] have hsq : Real.exp t = Real.sqrt ((1 - r) / r) := by rw [← Real.sqrt_sq (le_of_lt (Real.exp_pos t)), hEt] rw [hsq, Real.sqrt_div (by linarith), Real.sqrt_mul (le_of_lt hr0)] have hsr : 0 < Real.sqrt r := Real.sqrt_pos.mpr hr0 have hsq' : 0 < Real.sqrt (1 - r) := Real.sqrt_pos.mpr (by linarith) field_simp [ne_of_gt hsr, ne_of_gt hsq'] rw [Real.sq_sqrt (by linarith), Real.sq_sqrt (le_of_lt hr0)] ring have hlog_4rq : Real.log (1 / (4 * r * (1 - r))) = 2 * Real.log (Real.cosh t) := by have hsq : Real.cosh t ^ 2 = 1 / (4 * r * (1 - r)) := by rw [hch, div_pow, one_pow, mul_pow, Real.sq_sqrt (le_of_lt hrq_pos)]; ring rw [← hsq, Real.log_pow]; push_cast; ring have h12r : 1 - 2 * r = Real.sinh t / Real.cosh t := by rw [hsh, hch, div_div_div_cancel_right₀ (by positivity : (2 * Real.sqrt (r * (1 - r))) ≠ 0), div_one] have hhyp := sq_sinh_div_lt_log_cosh ht have hlogc_pos : 0 < Real.log (Real.cosh t) := by have h1 : 1 < Real.cosh t := by rw [hch, one_lt_div (by positivity)] have hlt : r * (1 - r) < 1 / 4 := by nlinarith [sq_pos_of_ne_zero (show r - 1 / 2 ≠ 0 by linarith)] have := Real.sqrt_lt_sqrt (le_of_lt hrq_pos) hlt rw [show (1 / 4 : ℝ) = (1 / 2) ^ 2 by norm_num, Real.sqrt_sq (by norm_num)] at this linarith exact Real.log_pos h1 have hL2t : L = 2 * t := by simp only [t]; ring rw [hlog_4rq, h12r, hL2t] have hch_pos : 0 < Real.cosh t := Real.cosh_pos t have hsh_pos : 0 < Real.sinh t := Real.sinh_pos_iff.mpr ht have hden_pos : 0 < t * Real.cosh t + Real.sinh t := by positivity rw [div_lt_iff₀ hden_pos] at hhyp rw [div_lt_iff₀ (by positivity : 0 < 2 * Real.log (Real.cosh t))] have hrew : (1 + 2 * (Real.sinh t / Real.cosh t) / (2 * t)) * (2 * Real.log (Real.cosh t)) = 2 * Real.log (Real.cosh t) * (t * Real.cosh t + Real.sinh t) / (t * Real.cosh t) := by field_simp [ne_of_gt ht, ne_of_gt hch_pos] rw [hrew, lt_div_iff₀ (mul_pos ht hch_pos)] have hrew2 : Real.sinh t / Real.cosh t * (2 * t) * (t * Real.cosh t) = 2 * (t ^ 2 * Real.sinh t) := by field_simp [ne_of_gt hch_pos] rw [hrew2] linarith unfold sharpMLSIUpperDSC alphaLS rw [if_neg hp_ne, if_neg hp_ne] by_cases hlt : p < 1 / 2 · exact helper p hp0 hlt · have hgt : 1 / 2 < p := lt_of_le_of_ne (not_lt.mp hlt) (Ne.symm hp_ne) have h := helper (1 - p) (by linarith) (by linarith) have hsub : 1 - (1 - p) = p := by ring have hlog_inv : Real.log ((1 - p) / p) = -Real.log (p / (1 - p)) := by rw [← Real.log_inv, inv_div] have h4 : 4 * (1 - p) * p = 4 * p * (1 - p) := by ring have h12 : 1 - 2 * (1 - p) = -(1 - 2 * p) := by ring rw [hsub, h4, h12] at h rw [hlog_inv] have hrew1 : (1 - 2 * p) * -Real.log (p / (1 - p)) = -(1 - 2 * p) * Real.log (p / (1 - p)) := by ring have hrew2 : 2 * (1 - 2 * p) / -Real.log (p / (1 - p)) = 2 * -(1 - 2 * p) / Real.log (p / (1 - p)) := by ring rw [hrew1, hrew2] exact h /-- Strict bound `alphaLS p < 1` for every `p ∈ (0, 1) \ {1/2}`. -/ theorem alphaLS_lt_one {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hp_ne : p ≠ 1 / 2) : alphaLS p < 1 := by unfold alphaLS; rw [if_neg hp_ne] by_cases hlt : p < 1 / 2 · have hr : 1 < (1 - p) / p := by rw [one_lt_div hp0]; linarith have hlog := two_sub_div_add_lt_log hr have hrew : 2 * ((1 - p) / p - 1) / ((1 - p) / p + 1) = 2 * (1 - 2 * p) := by field_simp [ne_of_gt hp0]; ring rw [hrew] at hlog rw [div_lt_one (Real.log_pos hr)] exact hlog · have hgt : 1 / 2 < p := lt_of_le_of_ne (not_lt.mp hlt) (Ne.symm hp_ne) have hr : 1 < p / (1 - p) := by rw [one_lt_div (by linarith)]; linarith have hlog := two_sub_div_add_lt_log hr have hrew : 2 * (p / (1 - p) - 1) / (p / (1 - p) + 1) = 2 * (2 * p - 1) := by field_simp [show (1 - p : ℝ) ≠ 0 by linarith]; ring rw [hrew] at hlog have hlog_inv : Real.log ((1 - p) / p) = -Real.log (p / (1 - p)) := by rw [← Real.log_inv, inv_div] rw [hlog_inv, div_neg, show -(2 * (1 - 2 * p) / Real.log (p / (1 - p))) = 2 * (2 * p - 1) / Real.log (p / (1 - p)) by ring, div_lt_one (Real.log_pos hr)] exact hlog /-- Positivity of `alphaLS p` for all `p ∈ (0, 1)`. -/ theorem alphaLS_pos {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) : 0 < alphaLS p := by unfold alphaLS split_ifs with heq · exact zero_lt_one · by_cases hlt : p < 1 / 2 · exact div_pos (by linarith) (Real.log_pos (by rw [one_lt_div hp0]; linarith)) · have hgt : 1 / 2 < p := lt_of_le_of_ne (not_lt.mp hlt) (Ne.symm heq) have hlog : Real.log ((1 - p) / p) < 0 := Real.log_neg (div_pos (by linarith) hp0) (by rw [div_lt_one hp0]; linarith) exact div_pos_of_neg_of_neg (by linarith) hlog /-- **HEADLINE THEOREM 7 — Complete Two-Sided Sandwich for `ρ_0(p)`:** For EVERY `p ∈ (0, 1)`, `sharpMLSILower p` is achievable and any valid MLSI constant `ρ` is trapped inside `[sharpMLSILower p, min (sharpMLSIUpperDSC p) (sharpMLSIUpperLog p)]`. -/ theorem mlsi_sharp_two_sided_sandwich {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) : (∀ a b : ℝ, 0 < a → 0 < b → sharpMLSILower p * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b) ∧ (∀ ρ : ℝ, (∀ a b : ℝ, 0 < a → 0 < b → ρ * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b) → ρ ≤ min (sharpMLSIUpperDSC p) (sharpMLSIUpperLog p)) ∧ sharpMLSILower p ≤ min (sharpMLSIUpperDSC p) (sharpMLSIUpperLog p) := by have hlb : ∀ a b : ℝ, 0 < a → 0 < b → sharpMLSILower p * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b := fun _ _ ha hb => mlsi_ge_sharp_log hp0 hp1 ha hb have hub : ∀ ρ : ℝ, (∀ a b : ℝ, 0 < a → 0 < b → ρ * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b) → ρ ≤ min (sharpMLSIUpperDSC p) (sharpMLSIUpperLog p) := fun _ hρ => le_min (mlsi_le_dsc_witness hp0 hp1 hρ) (mlsi_le_log_witness hp0 hp1 hρ) exact ⟨hlb, hub, hub (sharpMLSILower p) hlb⟩ /-! ## Section 6: Exact Diaconis–Saloff-Coste (1996) Log-Sobolev Constant `α_LS(p)` -/ /-- Exact attainment of `α_LS(p)` at the witness `f = (1, ((1 - p)/p)^2)`. -/ theorem lsi_attained_at_sq_ratio {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hp_ne : p ≠ 1 / 2) : bernoulliDirichletSqrt p 1 (((1 - p) / p) ^ 2) = alphaLS p * bernoulliEnt p 1 (((1 - p) / p) ^ 2) := by have hq : 0 < 1 - p := by linarith have hqp : 0 < (1 - p) / p := div_pos hq hp0 have hsq : Real.sqrt (((1 - p) / p) ^ 2) = (1 - p) / p := Real.sqrt_sq (le_of_lt hqp) have hmean : bernoulliMean p 1 (((1 - p) / p) ^ 2) = (1 - p) / p := by unfold bernoulliMean; field_simp [ne_of_gt hp0]; ring have hL_ne : Real.log ((1 - p) / p) ≠ 0 := by intro h have := Real.exp_log hqp rw [h, Real.exp_zero] at this rw [eq_comm, div_eq_one_iff_eq (ne_of_gt hp0)] at this apply hp_ne; linarith unfold bernoulliDirichletSqrt bernoulliEnt alphaLS rw [if_neg hp_ne, hsq, Real.sqrt_one, hmean, Real.log_one, mul_zero, zero_add, Real.log_pow] push_cast field_simp [ne_of_gt hp0, hL_ne] ring /-- Normalized Diaconis–Saloff-Coste LSI discrepancy `Ψ(p, s) = 2 p q (s - 1)^2 - α_LS Ent(1, s^2)`. -/ def psiLSI (p s : ℝ) : ℝ := 2 * p * (1 - p) * (s - 1) ^ 2 - alphaLS p * (2 * p * s ^ 2 * Real.log s - ((1 - p) + p * s ^ 2) * Real.log ((1 - p) + p * s ^ 2)) /-- First derivative `Ψ'(p, s)`. -/ def psiLSIDeriv (p s : ℝ) : ℝ := 4 * p * (1 - p) * (s - 1) - alphaLS p * (2 * p * s * (2 * Real.log s - Real.log ((1 - p) + p * s ^ 2))) /-- Second derivative `Ψ''(p, s)`. -/ def psiLSIDeriv2 (p s : ℝ) : ℝ := 4 * p * (1 - p) - alphaLS p * (2 * p * (2 * Real.log s - Real.log ((1 - p) + p * s ^ 2) + 2 * (1 - p) / ((1 - p) + p * s ^ 2))) /-- Third derivative `Ψ'''(p, s) = 4 α_LS p (1 - p) (p s^2 - (1 - p)) / (s ((1 - p) + p s^2)^2)`. -/ def psiLSIDeriv3 (p s : ℝ) : ℝ := 4 * alphaLS p * p * (1 - p) * (p * s ^ 2 - (1 - p)) / (s * ((1 - p) + p * s ^ 2) ^ 2) lemma psiLSI_eq_func {p s : ℝ} (hs : 0 < s) : psiLSI p s = bernoulliDirichletSqrt p 1 (s ^ 2) - alphaLS p * bernoulliEnt p 1 (s ^ 2) := by unfold psiLSI bernoulliDirichletSqrt bernoulliEnt bernoulliMean rw [Real.sqrt_sq (le_of_lt hs), Real.sqrt_one, Real.log_one, Real.log_pow] push_cast ring lemma hasDerivAt_psiLSI {p s : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hs : 0 < s) : HasDerivAt (psiLSI p) (psiLSIDeriv p s) s := by have hs0 : s ≠ 0 := ne_of_gt hs have hm : (1 - p) + p * s ^ 2 ≠ 0 := by nlinarith have h1 : HasDerivAt (fun x => 2 * p * (1 - p) * (x - 1) ^ 2) (4 * p * (1 - p) * (s - 1)) s := ((((hasDerivAt_id' s).sub_const 1).pow 2).const_mul (2 * p * (1 - p))).congr_deriv (by ring) have h2 : HasDerivAt (fun x => 2 * p * x ^ 2 * Real.log x) (4 * p * s * Real.log s + 2 * p * s) s := by have ha : HasDerivAt (fun x => 2 * p * x ^ 2) (4 * p * s) s := (((hasDerivAt_id' s).pow 2).const_mul (2 * p)).congr_deriv (by ring) exact (ha.mul (Real.hasDerivAt_log hs0)).congr_deriv (by field_simp) have h3 : HasDerivAt (fun x => ((1 - p) + p * x ^ 2) * Real.log ((1 - p) + p * x ^ 2)) (2 * p * s * (Real.log ((1 - p) + p * s ^ 2) + 1)) s := by have ha : HasDerivAt (fun x => (1 - p) + p * x ^ 2) (2 * p * s) s := ((((hasDerivAt_id' s).pow 2).const_mul p).const_add (1 - p)).congr_deriv (by ring) exact (ha.mul (ha.log hm)).congr_deriv (by field_simp) exact (h1.sub ((h2.sub h3).const_mul (alphaLS p))).congr_deriv (by unfold psiLSIDeriv; ring) lemma hasDerivAt_psiLSIDeriv {p s : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hs : 0 < s) : HasDerivAt (psiLSIDeriv p) (psiLSIDeriv2 p s) s := by have hs0 : s ≠ 0 := ne_of_gt hs have hm : (1 - p) + p * s ^ 2 ≠ 0 := by nlinarith have h1 : HasDerivAt (fun x => 4 * p * (1 - p) * (x - 1)) (4 * p * (1 - p)) s := (((hasDerivAt_id' s).sub_const 1).const_mul (4 * p * (1 - p))).congr_deriv (by ring) have h2 : HasDerivAt (fun x => 2 * p * x * (2 * Real.log x - Real.log ((1 - p) + p * x ^ 2))) (2 * p * (2 * Real.log s - Real.log ((1 - p) + p * s ^ 2) + 2 * (1 - p) / ((1 - p) + p * s ^ 2))) s := by have ha : HasDerivAt (fun x => 2 * p * x) (2 * p) s := ((hasDerivAt_id' s).const_mul (2 * p)).congr_deriv (by ring) have hlin : HasDerivAt (fun x => (1 - p) + p * x ^ 2) (2 * p * s) s := ((((hasDerivAt_id' s).pow 2).const_mul p).const_add (1 - p)).congr_deriv (by ring) have hb : HasDerivAt (fun x => 2 * Real.log x - Real.log ((1 - p) + p * x ^ 2)) (2 / s - 2 * p * s / ((1 - p) + p * s ^ 2)) s := (((Real.hasDerivAt_log hs0).const_mul 2).sub (hlin.log hm)).congr_deriv (by ring) exact (ha.mul hb).congr_deriv (by field_simp; ring) exact (h1.sub (h2.const_mul (alphaLS p))).congr_deriv (by unfold psiLSIDeriv2; ring) lemma hasDerivAt_psiLSIDeriv2 {p s : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hs : 0 < s) : HasDerivAt (psiLSIDeriv2 p) (psiLSIDeriv3 p s) s := by have hs0 : s ≠ 0 := ne_of_gt hs have hm : (1 - p) + p * s ^ 2 ≠ 0 := by nlinarith have hlin : HasDerivAt (fun x => (1 - p) + p * x ^ 2) (2 * p * s) s := ((((hasDerivAt_id' s).pow 2).const_mul p).const_add (1 - p)).congr_deriv (by ring) have hlog : HasDerivAt (fun x => 2 * Real.log x - Real.log ((1 - p) + p * x ^ 2)) (2 / s - 2 * p * s / ((1 - p) + p * s ^ 2)) s := (((Real.hasDerivAt_log hs0).const_mul 2).sub (hlin.log hm)).congr_deriv (by ring) have hrat : HasDerivAt (fun x => 2 * (1 - p) / ((1 - p) + p * x ^ 2)) (-(2 * (1 - p) * (2 * p * s)) / ((1 - p) + p * s ^ 2) ^ 2) s := ((hasDerivAt_const s (2 * (1 - p))).div hlin hm).congr_deriv (by ring) exact ((hasDerivAt_const s (4 * p * (1 - p))).sub (((hlog.add hrat).const_mul (2 * p)).const_mul (alphaLS p))).congr_deriv (by unfold psiLSIDeriv3; field_simp; ring) /-- Symmetric case `p = 1/2` of the Diaconis–Saloff-Coste Log-Sobolev inequality. -/ lemma diaconis_saloffCoste_lsi_half {x y : ℝ} (hx : 0 < x) (hy : 0 < y) : bernoulliEnt (1 / 2) x y ≤ bernoulliDirichletSqrt (1 / 2) x y := by rw [bernoulliEnt_eq_mul_one (by norm_num) (by norm_num) hx hy, bernoulliDirichletSqrt_eq_mul_one hx] set s := Real.sqrt (y / x) have hs : 0 < s := Real.sqrt_pos.mpr (div_pos hy hx) have hs2 : s ^ 2 = y / x := Real.sq_sqrt (le_of_lt (div_pos hy hx)) suffices hpsi : 0 ≤ psiLSI (1 / 2) s by rw [psiLSI_eq_func hs, hs2] at hpsi unfold alphaLS at hpsi; rw [if_pos rfl, one_mul] at hpsi nlinarith have hd3_neg : ∀ u : ℝ, 0 < u → u ≤ 1 → psiLSIDeriv3 (1 / 2) u ≤ 0 := by intro u hu0 hu1 unfold psiLSIDeriv3 alphaLS; rw [if_pos rfl] have hnum : (1 / 2 : ℝ) * u ^ 2 - (1 - 1 / 2) ≤ 0 := by nlinarith have hden : 0 < u * (1 - 1 / 2 + 1 / 2 * u ^ 2) ^ 2 := by positivity exact div_nonpos_of_nonpos_of_nonneg (by linarith) (le_of_lt hden) have hd3_pos : ∀ u : ℝ, 1 ≤ u → 0 ≤ psiLSIDeriv3 (1 / 2) u := by intro u hu1 unfold psiLSIDeriv3 alphaLS; rw [if_pos rfl] have hnum : 0 ≤ (1 / 2 : ℝ) * u ^ 2 - (1 - 1 / 2) := by nlinarith have hden : 0 < u * (1 - 1 / 2 + 1 / 2 * u ^ 2) ^ 2 := by positivity exact div_nonneg (by linarith) (le_of_lt hden) have hd2_1 : psiLSIDeriv2 (1 / 2) 1 = 0 := by unfold psiLSIDeriv2 alphaLS; rw [if_pos rfl] have : (1 - 1 / 2 : ℝ) + 1 / 2 * 1 ^ 2 = 1 := by norm_num rw [this, Real.log_one]; norm_num have hanti2 : AntitoneOn (psiLSIDeriv2 (1 / 2)) (Set.Ioc 0 1) := antitoneOn_of_deriv_nonpos (convex_Ioc 0 1) (fun u hu => (hasDerivAt_psiLSIDeriv2 (by norm_num) (by norm_num) hu.1).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSIDeriv2 (by norm_num) (by norm_num) (by rw [interior_Ioc] at hu; exact hu.1)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ioc] at hu; rw [(hasDerivAt_psiLSIDeriv2 (by norm_num) (by norm_num) hu.1).deriv]; exact hd3_neg u hu.1 (le_of_lt hu.2)) have hmono2 : MonotoneOn (psiLSIDeriv2 (1 / 2)) (Set.Ici 1) := monotoneOn_of_deriv_nonneg (convex_Ici 1) (fun u hu => (hasDerivAt_psiLSIDeriv2 (by norm_num) (by norm_num) (by linarith [Set.mem_Ici.mp hu])).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSIDeriv2 (by norm_num) (by norm_num) (by rw [interior_Ici] at hu; have : 1 < u := hu; linarith)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ici] at hu; have hu1 : 1 < u := hu; rw [(hasDerivAt_psiLSIDeriv2 (by norm_num) (by norm_num) (by linarith)).deriv]; exact hd3_pos u (le_of_lt hu1)) have hd2_nn : ∀ u : ℝ, 0 < u → 0 ≤ psiLSIDeriv2 (1 / 2) u := by intro u hu0 by_cases hu1 : u ≤ 1 · rw [← hd2_1]; exact hanti2 ⟨hu0, hu1⟩ ⟨zero_lt_one, le_rfl⟩ hu1 · push Not at hu1; rw [← hd2_1]; exact hmono2 Set.self_mem_Ici (le_of_lt hu1) (le_of_lt hu1) have hmono1 : MonotoneOn (psiLSIDeriv (1 / 2)) (Set.Ioi 0) := monotoneOn_of_deriv_nonneg (convex_Ioi 0) (fun u hu => (hasDerivAt_psiLSIDeriv (by norm_num) (by norm_num) hu).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSIDeriv (by norm_num) (by norm_num) (by rw [interior_Ioi] at hu; exact hu)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ioi] at hu; rw [(hasDerivAt_psiLSIDeriv (by norm_num) (by norm_num) hu).deriv]; exact hd2_nn u hu) have hd1_1 : psiLSIDeriv (1 / 2) 1 = 0 := by unfold psiLSIDeriv; have : (1 - 1 / 2 : ℝ) + 1 / 2 * 1 ^ 2 = 1 := by norm_num rw [this, Real.log_one]; ring have hpsi_1 : psiLSI (1 / 2) 1 = 0 := by unfold psiLSI; have : (1 - 1 / 2 : ℝ) + 1 / 2 * 1 ^ 2 = 1 := by norm_num rw [this, Real.log_one]; ring by_cases hs1 : 1 ≤ s · have hm : MonotoneOn (psiLSI (1 / 2)) (Set.Ici 1) := monotoneOn_of_deriv_nonneg (convex_Ici 1) (fun u hu => (hasDerivAt_psiLSI (by norm_num) (by norm_num) (by linarith [Set.mem_Ici.mp hu])).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSI (by norm_num) (by norm_num) (by rw [interior_Ici] at hu; have : 1 < u := hu; linarith)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ici] at hu; have hu1 : 1 < u := hu rw [(hasDerivAt_psiLSI (by norm_num) (by norm_num) (by linarith)).deriv, ← hd1_1] exact hmono1 (Set.mem_Ioi.mpr zero_lt_one) (Set.mem_Ioi.mpr (by linarith)) (le_of_lt hu1)) rw [← hpsi_1]; exact hm Set.self_mem_Ici hs1 hs1 · push Not at hs1 have ha' : AntitoneOn (psiLSI (1 / 2)) (Set.Ioc 0 1) := antitoneOn_of_deriv_nonpos (convex_Ioc 0 1) (fun u hu => (hasDerivAt_psiLSI (by norm_num) (by norm_num) hu.1).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSI (by norm_num) (by norm_num) (by rw [interior_Ioc] at hu; exact hu.1)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ioc] at hu rw [(hasDerivAt_psiLSI (by norm_num) (by norm_num) hu.1).deriv, ← hd1_1] exact hmono1 (Set.mem_Ioi.mpr hu.1) (Set.mem_Ioi.mpr zero_lt_one) (le_of_lt hu.2)) rw [← hpsi_1]; exact ha' ⟨hs, le_of_lt hs1⟩ ⟨zero_lt_one, le_rfl⟩ (le_of_lt hs1) /-- Asymmetric case `r ∈ (0, 1/2)` of the Diaconis–Saloff-Coste Log-Sobolev inequality. -/ lemma diaconis_saloffCoste_lsi_lt_half {r x y : ℝ} (hr0 : 0 < r) (hr1 : r < 1 / 2) (hx : 0 < x) (hy : 0 < y) : alphaLS r * bernoulliEnt r x y ≤ bernoulliDirichletSqrt r x y := by have hr_lt1 : r < 1 := by linarith have hr_ne : r ≠ 1 / 2 := ne_of_lt hr1 rw [bernoulliEnt_eq_mul_one hr0 hr_lt1 hx hy, bernoulliDirichletSqrt_eq_mul_one hx] set s := Real.sqrt (y / x) have hs : 0 < s := Real.sqrt_pos.mpr (div_pos hy hx) have hs2 : s ^ 2 = y / x := Real.sq_sqrt (le_of_lt (div_pos hy hx)) suffices hpsi : 0 ≤ psiLSI r s by rw [psiLSI_eq_func hs, hs2] at hpsi; nlinarith set q := 1 - r set m := Real.sqrt (q / r) set R := q / r have hq : 0 < q := by linarith have hR : 1 < R := by simp only [R]; rw [one_lt_div hr0]; linarith have hm1 : 1 < m := by simp only [m]; rw [← Real.sqrt_one]; exact Real.sqrt_lt_sqrt zero_le_one hR have hmR : m < R := by have : m ^ 2 = R := Real.sq_sqrt (le_of_lt (lt_trans zero_lt_one hR)) nlinarith have hα_pos : 0 < alphaLS r := alphaLS_pos hr0 hr_lt1 have hα_lt1 : alphaLS r < 1 := alphaLS_lt_one hr0 hr_lt1 hr_ne have hpsi_1 : psiLSI r 1 = 0 := by unfold psiLSI have : (1 - r) + r * 1 ^ 2 = 1 := by ring rw [this, Real.log_one]; ring have hpsi_R : psiLSI r R = 0 := by rw [psiLSI_eq_func (lt_trans zero_lt_one hR)] have := lsi_attained_at_sq_ratio hr0 hr_lt1 hr_ne simp only [R, q] at this ⊢; linarith have hd1_1 : psiLSIDeriv r 1 = 0 := by unfold psiLSIDeriv have : (1 - r) + r * 1 ^ 2 = 1 := by ring rw [this, Real.log_one]; ring have hd1_R : psiLSIDeriv r R = 0 := by unfold psiLSIDeriv alphaLS; rw [if_neg hr_ne] have hqm : (1 - r) + r * R ^ 2 = R := by simp only [R, q]; field_simp [ne_of_gt hr0]; ring rw [hqm] have hL_ne : Real.log R ≠ 0 := ne_of_gt (Real.log_pos hR) simp only [R, q] at hL_ne ⊢ field_simp [ne_of_gt hr0, hL_ne] ring have hd2_1 : 0 < psiLSIDeriv2 r 1 := by unfold psiLSIDeriv2 have : (1 - r) + r * 1 ^ 2 = 1 := by ring rw [this, Real.log_one, div_one] have hfac : 4 * r * (1 - r) - alphaLS r * (2 * r * (2 * 0 - 0 + 2 * (1 - r))) = 4 * r * (1 - r) * (1 - alphaLS r) := by ring rw [hfac] have h1α : 0 < 1 - alphaLS r := by linarith have h1r : 0 < 1 - r := by linarith positivity have hd2_R : 0 < psiLSIDeriv2 r R := by unfold psiLSIDeriv2 have hqm : (1 - r) + r * R ^ 2 = R := by simp only [R, q]; field_simp [ne_of_gt hr0]; ring rw [hqm] have hrew : 2 * Real.log R - Real.log R = Real.log R := by ring rw [hrew] have hα_eq : alphaLS r * Real.log R = 2 * (1 - 2 * r) := by unfold alphaLS; rw [if_neg hr_ne] have hL_ne : Real.log R ≠ 0 := ne_of_gt (Real.log_pos hR) simp only [R, q] at hL_ne ⊢ exact div_mul_cancel₀ _ hL_ne have h1R : 2 * (1 - r) / R = 2 * r := by simp only [R, q] have hq_ne : (1 - r : ℝ) ≠ 0 := ne_of_gt hq rw [div_div_eq_mul_div, mul_comm (2 * (1 - r)) r, ← mul_assoc, mul_div_cancel_right₀ _ hq_ne] ring rw [h1R] have hfac : 4 * r * (1 - r) - alphaLS r * (2 * r * (Real.log R + 2 * r)) = 4 * r ^ 2 * (1 - alphaLS r) := by have hmul : alphaLS r * (2 * r * (Real.log R + 2 * r)) = 2 * r * (alphaLS r * Real.log R) + 4 * r ^ 2 * alphaLS r := by ring rw [hmul, hα_eq]; ring rw [hfac] have h1α : 0 < 1 - alphaLS r := by linarith positivity have hanti2 : StrictAntiOn (psiLSIDeriv2 r) (Set.Ioc 0 m) := strictAntiOn_of_deriv_neg (convex_Ioc 0 m) (fun u hu => (hasDerivAt_psiLSIDeriv2 hr0 hr_lt1 hu.1).continuousAt.continuousWithinAt) (fun u hu => by rw [interior_Ioc] at hu have hu0 : 0 < u := hu.1 rw [(hasDerivAt_psiLSIDeriv2 hr0 hr_lt1 hu0).deriv] unfold psiLSIDeriv3 have hm_sq : m ^ 2 = q / r := Real.sq_sqrt (le_of_lt (lt_trans zero_lt_one hR)) have hnum : r * u ^ 2 - (1 - r) < 0 := by have hu2 : u ^ 2 < m ^ 2 := by nlinarith [hu0, hu.2] rw [hm_sq] at hu2 have := mul_lt_mul_of_pos_left hu2 hr0 rw [mul_div_cancel₀ q (ne_of_gt hr0)] at this simpa [q] using sub_neg.mpr this have hden : 0 < u * ((1 - r) + r * u ^ 2) ^ 2 := by have : 0 < (1 - r) + r * u ^ 2 := by nlinarith [hu0] positivity exact div_neg_of_neg_of_pos (by nlinarith [mul_pos hα_pos (mul_pos hr0 hq)]) hden) have hmono2 : StrictMonoOn (psiLSIDeriv2 r) (Set.Ici m) := strictMonoOn_of_deriv_pos (convex_Ici m) (fun u hu => (hasDerivAt_psiLSIDeriv2 hr0 hr_lt1 (by linarith [Set.mem_Ici.mp hu])).continuousAt.continuousWithinAt) (fun u hu => by rw [interior_Ici] at hu have hum : m < u := hu have hu0 : 0 < u := by linarith rw [(hasDerivAt_psiLSIDeriv2 hr0 hr_lt1 hu0).deriv] unfold psiLSIDeriv3 have hm_sq : m ^ 2 = q / r := Real.sq_sqrt (le_of_lt (lt_trans zero_lt_one hR)) have hnum : 0 < r * u ^ 2 - (1 - r) := by have hu2 : m ^ 2 < u ^ 2 := by nlinarith [hum, hm1] rw [hm_sq] at hu2 have := mul_lt_mul_of_pos_left hu2 hr0 rw [mul_div_cancel₀ q (ne_of_gt hr0)] at this simpa [q] using sub_pos.mpr this have hden : 0 < u * ((1 - r) + r * u ^ 2) ^ 2 := by have : 0 < (1 - r) + r * u ^ 2 := by nlinarith [hu0] positivity exact div_pos (by nlinarith [mul_pos hα_pos (mul_pos hr0 hq)]) hden) by_cases hm_nn : 0 ≤ psiLSIDeriv2 r m · have hd2_nn : ∀ u : ℝ, 0 < u → 0 ≤ psiLSIDeriv2 r u := by intro u hu0 by_cases hum : u ≤ m · exact le_trans hm_nn (hanti2.antitoneOn ⟨hu0, hum⟩ ⟨by linarith, le_rfl⟩ hum) · push Not at hum exact le_trans hm_nn (hmono2.monotoneOn Set.self_mem_Ici (le_of_lt hum) (le_of_lt hum)) have hmono1 : MonotoneOn (psiLSIDeriv r) (Set.Ioi 0) := monotoneOn_of_deriv_nonneg (convex_Ioi 0) (fun u hu => (hasDerivAt_psiLSIDeriv hr0 hr_lt1 hu).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSIDeriv hr0 hr_lt1 (by rw [interior_Ioi] at hu; exact hu)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ioi] at hu; rw [(hasDerivAt_psiLSIDeriv hr0 hr_lt1 hu).deriv]; exact hd2_nn u hu) by_cases hs1 : 1 ≤ s · have hms : MonotoneOn (psiLSI r) (Set.Ici 1) := monotoneOn_of_deriv_nonneg (convex_Ici 1) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 (by linarith [Set.mem_Ici.mp hu])).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 (by rw [interior_Ici] at hu; have : 1 < u := hu; linarith)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ici] at hu; have hu1 : 1 < u := hu rw [(hasDerivAt_psiLSI hr0 hr_lt1 (by linarith)).deriv, ← hd1_1] exact hmono1 (Set.mem_Ioi.mpr zero_lt_one) (Set.mem_Ioi.mpr (by linarith)) (le_of_lt hu1)) rw [← hpsi_1]; exact hms Set.self_mem_Ici hs1 hs1 · push Not at hs1 have has : AntitoneOn (psiLSI r) (Set.Ioc 0 1) := antitoneOn_of_deriv_nonpos (convex_Ioc 0 1) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 hu.1).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 (by rw [interior_Ioc] at hu; exact hu.1)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ioc] at hu rw [(hasDerivAt_psiLSI hr0 hr_lt1 hu.1).deriv, ← hd1_1] exact hmono1 (Set.mem_Ioi.mpr hu.1) (Set.mem_Ioi.mpr zero_lt_one) (le_of_lt hu.2)) rw [← hpsi_1]; exact has ⟨hs, le_of_lt hs1⟩ ⟨zero_lt_one, le_rfl⟩ (le_of_lt hs1) · push Not at hm_nn have hcont2_1 : ContinuousOn (psiLSIDeriv2 r) (Set.Icc 1 m) := fun u hu => (hasDerivAt_psiLSIDeriv2 hr0 hr_lt1 (by linarith [hu.1])).continuousAt.continuousWithinAt have hcont2_2 : ContinuousOn (psiLSIDeriv2 r) (Set.Icc m R) := fun u hu => (hasDerivAt_psiLSIDeriv2 hr0 hr_lt1 (by linarith [hu.1])).continuousAt.continuousWithinAt obtain ⟨r₁, ⟨hr₁_ge1, hr₁_lem⟩, hr₁_eq⟩ := intermediate_value_Icc' (le_of_lt hm1) hcont2_1 ⟨le_of_lt hm_nn, le_of_lt hd2_1⟩ obtain ⟨r₂, ⟨hr₂_gem, hr₂_leR⟩, hr₂_eq⟩ := intermediate_value_Icc (le_of_lt hmR) hcont2_2 ⟨le_of_lt hm_nn, le_of_lt hd2_R⟩ have hd2_lo : ∀ u : ℝ, 0 < u → u ≤ r₁ → 0 ≤ psiLSIDeriv2 r u := by intro u hu0 hur₁ rw [← hr₁_eq]; exact hanti2.antitoneOn ⟨hu0, le_trans hur₁ hr₁_lem⟩ ⟨by linarith, hr₁_lem⟩ hur₁ have hd2_mid : ∀ u : ℝ, r₁ ≤ u → u ≤ r₂ → psiLSIDeriv2 r u ≤ 0 := by intro u hr₁u hur₂ by_cases hum : u ≤ m · rw [← hr₁_eq]; exact hanti2.antitoneOn ⟨by linarith, hr₁_lem⟩ ⟨by linarith, hum⟩ hr₁u · push Not at hum rw [← hr₂_eq]; exact hmono2.monotoneOn (le_of_lt hum) hr₂_gem hur₂ have hd2_hi : ∀ u : ℝ, r₂ ≤ u → 0 ≤ psiLSIDeriv2 r u := by intro u hur₂ rw [← hr₂_eq]; exact hmono2.monotoneOn hr₂_gem (le_trans hr₂_gem hur₂) hur₂ have hmono1_lo : MonotoneOn (psiLSIDeriv r) (Set.Ioc 0 r₁) := monotoneOn_of_deriv_nonneg (convex_Ioc 0 r₁) (fun u hu => (hasDerivAt_psiLSIDeriv hr0 hr_lt1 hu.1).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSIDeriv hr0 hr_lt1 (by rw [interior_Ioc] at hu; exact hu.1)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ioc] at hu; rw [(hasDerivAt_psiLSIDeriv hr0 hr_lt1 hu.1).deriv]; exact hd2_lo u hu.1 (le_of_lt hu.2)) have hanti1_mid : AntitoneOn (psiLSIDeriv r) (Set.Icc r₁ r₂) := antitoneOn_of_deriv_nonpos (convex_Icc r₁ r₂) (fun u hu => (hasDerivAt_psiLSIDeriv hr0 hr_lt1 (by linarith [hu.1])).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSIDeriv hr0 hr_lt1 (by rw [interior_Icc] at hu; linarith [hu.1])).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Icc] at hu; rw [(hasDerivAt_psiLSIDeriv hr0 hr_lt1 (by linarith [hu.1])).deriv]; exact hd2_mid u (le_of_lt hu.1) (le_of_lt hu.2)) have hmono1_hi : MonotoneOn (psiLSIDeriv r) (Set.Ici r₂) := monotoneOn_of_deriv_nonneg (convex_Ici r₂) (fun u hu => (hasDerivAt_psiLSIDeriv hr0 hr_lt1 (by linarith [Set.mem_Ici.mp hu])).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSIDeriv hr0 hr_lt1 (by rw [interior_Ici] at hu; have : r₂ < u := hu; linarith)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ici] at hu; have hur₂ : r₂ < u := hu; rw [(hasDerivAt_psiLSIDeriv hr0 hr_lt1 (by linarith)).deriv]; exact hd2_hi u (le_of_lt hur₂)) have hd1_r₁ : 0 ≤ psiLSIDeriv r r₁ := by rw [← hd1_1]; exact hmono1_lo ⟨zero_lt_one, hr₁_ge1⟩ ⟨by linarith, le_rfl⟩ hr₁_ge1 have hd1_r₂ : psiLSIDeriv r r₂ ≤ 0 := by rw [← hd1_R]; exact hmono1_hi Set.self_mem_Ici hr₂_leR hr₂_leR have hcont1_mid : ContinuousOn (psiLSIDeriv r) (Set.Icc r₁ r₂) := fun u hu => (hasDerivAt_psiLSIDeriv hr0 hr_lt1 (by linarith [hu.1])).continuousAt.continuousWithinAt obtain ⟨s₀, ⟨hs₀_ge, hs₀_le⟩, hs₀_eq⟩ := intermediate_value_Icc' (by linarith : r₁ ≤ r₂) hcont1_mid ⟨hd1_r₂, hd1_r₁⟩ by_cases hs1 : s ≤ 1 · have hanti : AntitoneOn (psiLSI r) (Set.Ioc 0 1) := antitoneOn_of_deriv_nonpos (convex_Ioc 0 1) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 hu.1).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 (by rw [interior_Ioc] at hu; exact hu.1)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ioc] at hu rw [(hasDerivAt_psiLSI hr0 hr_lt1 hu.1).deriv, ← hd1_1] exact hmono1_lo ⟨hu.1, le_trans (le_of_lt hu.2) hr₁_ge1⟩ ⟨zero_lt_one, hr₁_ge1⟩ (le_of_lt hu.2)) rw [← hpsi_1]; exact hanti ⟨hs, hs1⟩ ⟨zero_lt_one, le_rfl⟩ hs1 · push Not at hs1 by_cases hss₀ : s ≤ s₀ · have hmono : MonotoneOn (psiLSI r) (Set.Icc 1 s₀) := monotoneOn_of_deriv_nonneg (convex_Icc 1 s₀) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 (by linarith [hu.1])).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 (by rw [interior_Icc] at hu; linarith [hu.1])).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Icc] at hu rw [(hasDerivAt_psiLSI hr0 hr_lt1 (by linarith [hu.1])).deriv] by_cases hur₁ : u ≤ r₁ · rw [← hd1_1]; exact hmono1_lo ⟨zero_lt_one, hr₁_ge1⟩ ⟨by linarith [hu.1], hur₁⟩ (le_of_lt hu.1) · push Not at hur₁ rw [← hs₀_eq] exact hanti1_mid ⟨le_of_lt hur₁, le_trans (le_of_lt hu.2) hs₀_le⟩ ⟨hs₀_ge, hs₀_le⟩ (le_of_lt hu.2)) rw [← hpsi_1]; exact hmono ⟨le_rfl, by linarith⟩ ⟨le_of_lt hs1, hss₀⟩ (le_of_lt hs1) · push Not at hss₀ by_cases hsR : s ≤ R · have hanti : AntitoneOn (psiLSI r) (Set.Icc s₀ R) := antitoneOn_of_deriv_nonpos (convex_Icc s₀ R) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 (by linarith [hu.1])).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 (by rw [interior_Icc] at hu; linarith [hu.1])).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Icc] at hu rw [(hasDerivAt_psiLSI hr0 hr_lt1 (by linarith [hu.1])).deriv] by_cases hur₂ : u ≤ r₂ · rw [← hs₀_eq] exact hanti1_mid ⟨hs₀_ge, hs₀_le⟩ ⟨le_trans hs₀_ge (le_of_lt hu.1), hur₂⟩ (le_of_lt hu.1) · push Not at hur₂ rw [← hd1_R] exact hmono1_hi (le_of_lt hur₂) hr₂_leR (le_of_lt hu.2)) rw [← hpsi_R]; exact hanti ⟨le_of_lt hss₀, hsR⟩ ⟨by linarith, le_rfl⟩ hsR · push Not at hsR have hmono : MonotoneOn (psiLSI r) (Set.Ici R) := monotoneOn_of_deriv_nonneg (convex_Ici R) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 (by linarith [Set.mem_Ici.mp hu])).continuousAt.continuousWithinAt) (fun u hu => (hasDerivAt_psiLSI hr0 hr_lt1 (by rw [interior_Ici] at hu; have : R < u := hu; linarith)).differentiableAt.differentiableWithinAt) (fun u hu => by rw [interior_Ici] at hu have huR : R < u := hu rw [(hasDerivAt_psiLSI hr0 hr_lt1 (by linarith)).deriv, ← hd1_R] exact hmono1_hi hr₂_leR (le_trans hr₂_leR (le_of_lt huR)) (le_of_lt huR)) rw [← hpsi_R]; exact hmono Set.self_mem_Ici (le_of_lt hsR) (le_of_lt hsR) /-- **HEADLINE THEOREM 8 — Diaconis–Saloff-Coste (1996, Theorem A.1) Exact Two-Point LSI:** For ALL `p ∈ (0, 1)` and ALL `a, b > 0`, `alphaLS p * Ent_{μ_p}(a, b) ≤ 2 p (1 - p) (√b - √a)^2`. -/ theorem diaconis_saloffCoste_lsi {p a b : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (ha : 0 < a) (hb : 0 < b) : alphaLS p * bernoulliEnt p a b ≤ bernoulliDirichletSqrt p a b := by by_cases heq : p = 1 / 2 · subst heq; unfold alphaLS; rw [if_pos rfl, one_mul]; exact diaconis_saloffCoste_lsi_half ha hb · by_cases hlt : p < 1 / 2 · exact diaconis_saloffCoste_lsi_lt_half hp0 hlt ha hb · have hgt : 1 / 2 < p := lt_of_le_of_ne (not_lt.mp hlt) (Ne.symm heq) have hsym := diaconis_saloffCoste_lsi_lt_half (r := 1 - p) (by linarith) (by linarith) hb ha rw [bernoulliEnt_symm, bernoulliDirichletSqrt_symm] at hsym have hα_sym : alphaLS (1 - p) = alphaLS p := by unfold alphaLS rw [if_neg (by linarith), if_neg heq, sub_sub_cancel] have hlog : Real.log (p / (1 - p)) = -Real.log ((1 - p) / p) := by rw [← Real.log_inv, inv_div] rw [hlog]; ring rwa [hα_sym] at hsym /-- **HEADLINE THEOREM 9 — Complete Strict Spectral–Entropy Hierarchy (All `p ∈ (0, 1) \ {1/2}`):** `0 < α_LS(p) < 1 < 1 + 2 √(p(1-p)) < sharpMLSILower p ≤ sharpMLSIUpperDSC p < 1 + α_LS(p) < 2`. -/ theorem full_spectral_entropy_hierarchy {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hp_ne : p ≠ 1 / 2) : 0 < alphaLS p ∧ alphaLS p < 1 ∧ 1 < 1 + 2 * Real.sqrt (p * (1 - p)) ∧ 1 + 2 * Real.sqrt (p * (1 - p)) < sharpMLSILower p ∧ sharpMLSILower p ≤ sharpMLSIUpperDSC p ∧ sharpMLSIUpperDSC p < 1 + alphaLS p ∧ 1 + alphaLS p < 2 := by have h1 := alphaLS_pos hp0 hp1 have h2 := alphaLS_lt_one hp0 hp1 hp_ne have h3 : 1 < 1 + 2 * Real.sqrt (p * (1 - p)) := by have : 0 < Real.sqrt (p * (1 - p)) := Real.sqrt_pos.mpr (by nlinarith) linarith have h4 := sharp_log_gt_erbarMaas hp0 hp1 hp_ne have h5 : sharpMLSILower p ≤ sharpMLSIUpperDSC p := mlsi_le_dsc_witness hp0 hp1 (fun a b ha hb => mlsi_ge_sharp_log hp0 hp1 ha hb) have h6 := dsc_witness_lt_one_add_lsi hp0 hp1 hp_ne have h7 : 1 + alphaLS p < 2 := by linarith exact ⟨h1, h2, h3, h4, h5, h6, h7⟩ /-! ## Section 7: Exact Tensorization to the Biased Hypercube `{0, 1}_p^n` & Entropy Decay -/ /-- Product Bernoulli measure weight `μ_p^{⊗ n}(x) = ∏_{i : Fin n} (if x i then p else 1 - p)`. -/ def hypercubeWeight (p : ℝ) {n : ℕ} (x : Fin n → Bool) : ℝ := ∏ i : Fin n, if x i then p else 1 - p /-- Product expectation `E_{μ_p^{⊗ n}}[f]`. -/ def hypercubeMean (p : ℝ) {n : ℕ} (f : (Fin n → Bool) → ℝ) : ℝ := ∑ x : Fin n → Bool, hypercubeWeight p x * f x /-- Product entropy `Ent_{μ_p^{⊗ n}}(f) = E[f log f] - E[f] log E[f]`. -/ def hypercubeEnt (p : ℝ) {n : ℕ} (f : (Fin n → Bool) → ℝ) : ℝ := (∑ x : Fin n → Bool, hypercubeWeight p x * (f x * Real.log (f x))) - hypercubeMean p f * Real.log (hypercubeMean p f) /-- Modified Dirichlet form on the `n`-dimensional biased hypercube `{0, 1}_p^n`: `E_n(f, log f) = ∑_{i : Fin n} E_x[ E_{μ_p}(f(x^{i←0}), f(x^{i←1})) ]`. -/ def hypercubeDirichletLog (p : ℝ) {n : ℕ} (f : (Fin n → Bool) → ℝ) : ℝ := ∑ i : Fin n, ∑ x : Fin n → Bool, hypercubeWeight p x * bernoulliDirichletLog p (f (Function.update x i false)) (f (Function.update x i true)) /-- Standard square-root Dirichlet form on `{0, 1}_p^n`: `2 E_n(√f, √f) = ∑_{i : Fin n} E_x[ 2 E_{μ_p}(√f(x^{i←0}), √f(x^{i←1})) ]`. -/ def hypercubeDirichletSqrt (p : ℝ) {n : ℕ} (f : (Fin n → Bool) → ℝ) : ℝ := ∑ i : Fin n, ∑ x : Fin n → Bool, hypercubeWeight p x * bernoulliDirichletSqrt p (f (Function.update x i false)) (f (Function.update x i true)) lemma hypercubeWeight_pos {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) {n : ℕ} (x : Fin n → Bool) : 0 < hypercubeWeight p x := by unfold hypercubeWeight apply Finset.prod_pos intro i _ cases x i <;> simp <;> linarith lemma hypercubeWeight_cons (p : ℝ) {n : ℕ} (b : Bool) (y : Fin n → Bool) : hypercubeWeight p (Fin.cons b y) = (if b then p else 1 - p) * hypercubeWeight p y := by unfold hypercubeWeight rw [Fin.prod_univ_succ] simp [Fin.cons_zero, Fin.cons_succ] /-- Splitting a sum over `Fin (n + 1) → Bool` into `false` and `true` slices on coordinate `0`. -/ lemma sum_hypercube_succ {n : ℕ} (g : (Fin (n + 1) → Bool) → ℝ) : (∑ x : Fin (n + 1) → Bool, g x) = (∑ y : Fin n → Bool, g (Fin.cons false y)) + (∑ y : Fin n → Bool, g (Fin.cons true y)) := by let e : (Bool × (Fin n → Bool)) ≃ (Fin (n + 1) → Bool) := { toFun := fun p => Fin.cons p.1 p.2 invFun := fun x => (x 0, fun i => x i.succ) left_inv := fun ⟨b, y⟩ => by ext <;> simp right_inv := fun x => by ext i refine Fin.cases ?_ ?_ i <;> simp } rw [← Fintype.sum_equiv e (fun p => g (e p)) g (fun _ => rfl)] rw [Fintype.sum_prod_type] simp [e, add_comm] lemma sum_hypercubeWeight (p : ℝ) : ∀ n : ℕ, ∑ x : Fin n → Bool, hypercubeWeight p x = 1 | 0 => by simp [hypercubeWeight] | n + 1 => by rw [sum_hypercube_succ] simp only [hypercubeWeight_cons, Bool.false_eq_true, ↓reduceIte, ← Finset.mul_sum, sum_hypercubeWeight p n] ring lemma hypercubeMean_pos {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) {n : ℕ} {f : (Fin n → Bool) → ℝ} (hf : ∀ x, 0 < f x) : 0 < hypercubeMean p f := by unfold hypercubeMean apply Finset.sum_pos · intro x _ exact mul_pos (hypercubeWeight_pos hp0 hp1 x) (hf x) · exact Finset.univ_nonempty lemma hypercubeMean_succ (p : ℝ) {n : ℕ} (f : (Fin (n + 1) → Bool) → ℝ) : hypercubeMean p f = bernoulliMean p (hypercubeMean p (fun y => f (Fin.cons false y))) (hypercubeMean p (fun y => f (Fin.cons true y))) := by unfold hypercubeMean bernoulliMean rw [sum_hypercube_succ] simp only [hypercubeWeight_cons, Bool.false_eq_true, ↓reduceIte, mul_assoc, ← Finset.mul_sum] /-- **Exact Chain Rule for Product Entropy** on `{0, 1}_p^{n+1}`: `Ent_{n+1}(f) = (1 - p) Ent_n(f₀) + p Ent_n(f₁) + Ent_{μ_p}(E_n[f₀], E_n[f₁])`. -/ theorem hypercubeEnt_chain_rule (p : ℝ) {n : ℕ} (f : (Fin (n + 1) → Bool) → ℝ) : hypercubeEnt p f = (1 - p) * hypercubeEnt p (fun y => f (Fin.cons false y)) + p * hypercubeEnt p (fun y => f (Fin.cons true y)) + bernoulliEnt p (hypercubeMean p (fun y => f (Fin.cons false y))) (hypercubeMean p (fun y => f (Fin.cons true y))) := by unfold hypercubeEnt bernoulliEnt rw [sum_hypercube_succ, hypercubeMean_succ] simp only [hypercubeWeight_cons, Bool.false_eq_true, ↓reduceIte, mul_assoc, ← Finset.mul_sum] ring /-- **Joint Convexity of Two-Point Entropy (Gibbs / Log-Sum Proof in 6 Lines!):** `Ent_{μ_p}(E[f₀], E[f₁]) ≤ E[Ent_{μ_p}(f₀, f₁)]`. -/ theorem bernoulliEnt_jensen_hypercube {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) {n : ℕ} {f₀ f₁ : (Fin n → Bool) → ℝ} (hf₀ : ∀ y, 0 < f₀ y) (hf₁ : ∀ y, 0 < f₁ y) : bernoulliEnt p (hypercubeMean p f₀) (hypercubeMean p f₁) ≤ ∑ y : Fin n → Bool, hypercubeWeight p y * bernoulliEnt p (f₀ y) (f₁ y) := by set M₀ := hypercubeMean p f₀ set M₁ := hypercubeMean p f₁ set M := bernoulliMean p M₀ M₁ have hM₀ : 0 < M₀ := hypercubeMean_pos hp0 hp1 hf₀ have hM₁ : 0 < M₁ := hypercubeMean_pos hp0 hp1 hf₁ have hM : 0 < M := bernoulliMean_pos hp0 hp1 hM₀ hM₁ have hpt : ∀ y : Fin n → Bool, (1 - p) * f₀ y * Real.log (M₀ / M) + p * f₁ y * Real.log (M₁ / M) ≤ bernoulliEnt p (f₀ y) (f₁ y) := by intro y set a := f₀ y set b := f₁ y set m := bernoulliMean p a b have ha : 0 < a := hf₀ y have hb : 0 < b := hf₁ y have hm : 0 < m := bernoulliMean_pos hp0 hp1 ha hb have h1 : Real.log ((m * M₀) / (a * M)) ≤ (m * M₀) / (a * M) - 1 := Real.log_le_sub_one_of_pos (div_pos (mul_pos hm hM₀) (mul_pos ha hM)) have h2 : Real.log ((m * M₁) / (b * M)) ≤ (m * M₁) / (b * M) - 1 := Real.log_le_sub_one_of_pos (div_pos (mul_pos hm hM₁) (mul_pos hb hM)) rw [Real.log_div (ne_of_gt (mul_pos hm hM₀)) (ne_of_gt (mul_pos ha hM)), Real.log_mul (ne_of_gt hm) (ne_of_gt hM₀), Real.log_mul (ne_of_gt ha) (ne_of_gt hM)] at h1 rw [Real.log_div (ne_of_gt (mul_pos hm hM₁)) (ne_of_gt (mul_pos hb hM)), Real.log_mul (ne_of_gt hm) (ne_of_gt hM₁), Real.log_mul (ne_of_gt hb) (ne_of_gt hM)] at h2 have h1' := mul_le_mul_of_nonneg_left h1 (show 0 ≤ (1 - p) * a by nlinarith) have h2' := mul_le_mul_of_nonneg_left h2 (show 0 ≤ p * b by nlinarith) have hsum : (1 - p) * a * ((m * M₀) / (a * M) - 1) + p * b * ((m * M₁) / (b * M) - 1) = 0 := by have ha0 : a ≠ 0 := ne_of_gt ha have hb0 : b ≠ 0 := ne_of_gt hb have hM0 : M ≠ 0 := ne_of_gt hM field_simp simp only [M, m, bernoulliMean] ring rw [Real.log_div (ne_of_gt hM₀) (ne_of_gt hM), Real.log_div (ne_of_gt hM₁) (ne_of_gt hM)] unfold bernoulliEnt change (1 - p) * a * (Real.log M₀ - Real.log M) + p * b * (Real.log M₁ - Real.log M) ≤ (1 - p) * a * Real.log a + p * b * Real.log b - m * Real.log m have hm_def : (1 - p) * a + p * b = m := rfl linarith [show (1 - p) * a * Real.log m + p * b * Real.log m = m * Real.log m by rw [← add_mul, hm_def]] have hsum_le : (∑ y : Fin n → Bool, hypercubeWeight p y * ((1 - p) * f₀ y * Real.log (M₀ / M) + p * f₁ y * Real.log (M₁ / M))) ≤ ∑ y : Fin n → Bool, hypercubeWeight p y * bernoulliEnt p (f₀ y) (f₁ y) := by apply Finset.sum_le_sum intro y _ exact mul_le_mul_of_nonneg_left (hpt y) (le_of_lt (hypercubeWeight_pos hp0 hp1 y)) have hlhs : (∑ y : Fin n → Bool, hypercubeWeight p y * ((1 - p) * f₀ y * Real.log (M₀ / M) + p * f₁ y * Real.log (M₁ / M))) = bernoulliEnt p M₀ M₁ := by have hrew : ∀ y : Fin n → Bool, hypercubeWeight p y * ((1 - p) * f₀ y * Real.log (M₀ / M) + p * f₁ y * Real.log (M₁ / M)) = (1 - p) * Real.log (M₀ / M) * (hypercubeWeight p y * f₀ y) + p * Real.log (M₁ / M) * (hypercubeWeight p y * f₁ y) := fun y => by ring simp_rw [hrew, Finset.sum_add_distrib, ← Finset.mul_sum] change (1 - p) * Real.log (M₀ / M) * M₀ + p * Real.log (M₁ / M) * M₁ = bernoulliEnt p M₀ M₁ rw [Real.log_div (ne_of_gt hM₀) (ne_of_gt hM), Real.log_div (ne_of_gt hM₁) (ne_of_gt hM)] unfold bernoulliEnt change (1 - p) * (Real.log M₀ - Real.log M) * M₀ + p * (Real.log M₁ - Real.log M) * M₁ = (1 - p) * M₀ * Real.log M₀ + p * M₁ * Real.log M₁ - M * Real.log M have hM_def : M = (1 - p) * M₀ + p * M₁ := rfl rw [hM_def] ring linarith /-- Helper: updating coordinate `0` of `Fin.cons b y`. -/ lemma update_cons_zero {n : ℕ} (b : Bool) (y : Fin n → Bool) (c : Bool) : Function.update (Fin.cons b y : Fin (n + 1) → Bool) 0 c = Fin.cons c y := by ext i refine Fin.cases ?_ ?_ i <;> simp /-- Helper: updating coordinate `j.succ` of `Fin.cons b y`. -/ lemma update_cons_succ {n : ℕ} (b : Bool) (y : Fin n → Bool) (j : Fin n) (c : Bool) : Function.update (Fin.cons b y : Fin (n + 1) → Bool) j.succ c = Fin.cons b (Function.update y j c) := by ext i refine Fin.cases ?_ ?_ i · rw [Function.update_of_ne (Fin.succ_ne_zero j).symm] simp · intro k by_cases hkj : k = j · subst hkj; simp · simp [hkj, Fin.succ_inj] /-- **Exact Subadditivity of Entropy on `{0, 1}_p^n`:** `Ent_{μ_p^{⊗ n}}(f) ≤ ∑_{i : Fin n} E_x[ Ent_{μ_p}(f(x^{i←0}), f(x^{i←1})) ]`. -/ theorem entropy_subadditive_hypercube {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) : ∀ {n : ℕ} (f : (Fin n → Bool) → ℝ), (∀ x, 0 < f x) → hypercubeEnt p f ≤ ∑ i : Fin n, ∑ x : Fin n → Bool, hypercubeWeight p x * bernoulliEnt p (f (Function.update x i false)) (f (Function.update x i true)) | 0, f, _ => by have hent0 : hypercubeEnt p f = 0 := by unfold hypercubeEnt hypercubeMean hypercubeWeight simp simp [hent0] | n + 1, f, hf => by set f₀ : (Fin n → Bool) → ℝ := fun y => f (Fin.cons false y) set f₁ : (Fin n → Bool) → ℝ := fun y => f (Fin.cons true y) have hf₀ : ∀ y, 0 < f₀ y := fun y => hf (Fin.cons false y) have hf₁ : ∀ y, 0 < f₁ y := fun y => hf (Fin.cons true y) have hchain := hypercubeEnt_chain_rule p f have hjensen := bernoulliEnt_jensen_hypercube hp0 hp1 hf₀ hf₁ have hih₀ := entropy_subadditive_hypercube hp0 hp1 f₀ hf₀ have hih₁ := entropy_subadditive_hypercube hp0 hp1 f₁ hf₁ rw [Fin.sum_univ_succ] have hterm0 : (∑ x : Fin (n + 1) → Bool, hypercubeWeight p x * bernoulliEnt p (f (Function.update x 0 false)) (f (Function.update x 0 true))) = ∑ y : Fin n → Bool, hypercubeWeight p y * bernoulliEnt p (f₀ y) (f₁ y) := by rw [sum_hypercube_succ] simp only [update_cons_zero, hypercubeWeight_cons, Bool.false_eq_true, ↓reduceIte, mul_assoc, ← Finset.mul_sum] change (1 - p) * (∑ y, hypercubeWeight p y * bernoulliEnt p (f₀ y) (f₁ y)) + p * (∑ y, hypercubeWeight p y * bernoulliEnt p (f₀ y) (f₁ y)) = _ ring have hterm_succ : (∑ j : Fin n, ∑ x : Fin (n + 1) → Bool, hypercubeWeight p x * bernoulliEnt p (f (Function.update x j.succ false)) (f (Function.update x j.succ true))) = (1 - p) * (∑ j : Fin n, ∑ y : Fin n → Bool, hypercubeWeight p y * bernoulliEnt p (f₀ (Function.update y j false)) (f₀ (Function.update y j true))) + p * (∑ j : Fin n, ∑ y : Fin n → Bool, hypercubeWeight p y * bernoulliEnt p (f₁ (Function.update y j false)) (f₁ (Function.update y j true))) := by have hinner : ∀ j : Fin n, (∑ x : Fin (n + 1) → Bool, hypercubeWeight p x * bernoulliEnt p (f (Function.update x j.succ false)) (f (Function.update x j.succ true))) = (1 - p) * (∑ y : Fin n → Bool, hypercubeWeight p y * bernoulliEnt p (f₀ (Function.update y j false)) (f₀ (Function.update y j true))) + p * (∑ y : Fin n → Bool, hypercubeWeight p y * bernoulliEnt p (f₁ (Function.update y j false)) (f₁ (Function.update y j true))) := by intro j rw [sum_hypercube_succ] simp only [update_cons_succ, hypercubeWeight_cons, Bool.false_eq_true, ↓reduceIte, mul_assoc, ← Finset.mul_sum] rfl simp_rw [hinner] rw [Finset.sum_add_distrib, ← Finset.mul_sum, ← Finset.mul_sum] rw [hterm0, hterm_succ, hchain] nlinarith /-- **HEADLINE THEOREM 10 — Exact Dimension-Free Tensorization of MLSI on `{0, 1}_p^n`:** Any two-point MLSI constant `ρ` lifts with ZERO dimension loss to ALL `n ∈ ℕ`! -/ theorem mlsi_tensorization_hypercube {p ρ : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hρ0 : 0 ≤ ρ) (hρ : ∀ a b : ℝ, 0 < a → 0 < b → ρ * bernoulliEnt p a b ≤ bernoulliDirichletLog p a b) {n : ℕ} (f : (Fin n → Bool) → ℝ) (hf : ∀ x, 0 < f x) : ρ * hypercubeEnt p f ≤ hypercubeDirichletLog p f := by have hsub := entropy_subadditive_hypercube hp0 hp1 f hf have h1 := mul_le_mul_of_nonneg_left hsub hρ0 unfold hypercubeDirichletLog rw [Finset.mul_sum] at h1 refine le_trans h1 ?_ apply Finset.sum_le_sum intro i _ rw [Finset.mul_sum] apply Finset.sum_le_sum intro x _ have hw := le_of_lt (hypercubeWeight_pos hp0 hp1 x) have h2 := hρ _ _ (hf (Function.update x i false)) (hf (Function.update x i true)) calc ρ * (hypercubeWeight p x * bernoulliEnt p (f (Function.update x i false)) (f (Function.update x i true))) = hypercubeWeight p x * (ρ * bernoulliEnt p (f (Function.update x i false)) (f (Function.update x i true))) := by ring _ ≤ hypercubeWeight p x * bernoulliDirichletLog p (f (Function.update x i false)) (f (Function.update x i true)) := mul_le_mul_of_nonneg_left h2 hw /-- **HEADLINE THEOREM 11 — Exact Dimension-Free Tensorization of Standard LSI on `{0, 1}_p^n`:** Diaconis–Saloff-Coste's `α_LS(p)` lifts with zero loss to ALL `n ∈ ℕ`. -/ theorem lsi_tensorization_hypercube {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) {n : ℕ} (f : (Fin n → Bool) → ℝ) (hf : ∀ x, 0 < f x) : alphaLS p * hypercubeEnt p f ≤ hypercubeDirichletSqrt p f := by have hsub := entropy_subadditive_hypercube hp0 hp1 f hf have h1 := mul_le_mul_of_nonneg_left hsub (le_of_lt (alphaLS_pos hp0 hp1)) unfold hypercubeDirichletSqrt rw [Finset.mul_sum] at h1 refine le_trans h1 ?_ apply Finset.sum_le_sum intro i _ rw [Finset.mul_sum] apply Finset.sum_le_sum intro x _ have hw := le_of_lt (hypercubeWeight_pos hp0 hp1 x) have h2 := diaconis_saloffCoste_lsi hp0 hp1 (hf (Function.update x i false)) (hf (Function.update x i true)) calc alphaLS p * (hypercubeWeight p x * bernoulliEnt p (f (Function.update x i false)) (f (Function.update x i true))) = hypercubeWeight p x * (alphaLS p * bernoulliEnt p (f (Function.update x i false)) (f (Function.update x i true))) := by ring _ ≤ hypercubeWeight p x * bernoulliDirichletSqrt p (f (Function.update x i false)) (f (Function.update x i true)) := mul_le_mul_of_nonneg_left h2 hw /-- **HEADLINE THEOREM 12 — Sharp Biased Hypercube MLSI Theorem (All Dimensions `n` & All `p ∈ (0, 1)`):** Strictly improves Bobkov–Tetali (2006) (`ρ ≥ 1`) and Erbar–Maas (2012) / Mielke (2013) (`ρ ≥ 1 + 2 √(p (1 - p))`) on `{0, 1}_p^n` for EVERY `n ≥ 1` and EVERY `p ∈ (0, 1) \ {1/2}`! -/ theorem hypercube_mlsi_sharp_log {p : ℝ} (hp0 : 0 < p) (hp1 : p < 1) {n : ℕ} (f : (Fin n → Bool) → ℝ) (hf : ∀ x, 0 < f x) : sharpMLSILower p * hypercubeEnt p f ≤ hypercubeDirichletLog p f := by have hρ_nn : 0 ≤ sharpMLSILower p := by by_cases heq : p = 1 / 2 · subst heq; unfold sharpMLSILower; rw [if_pos rfl]; norm_num · have hgt := sharp_log_gt_erbarMaas hp0 hp1 heq have hsq : 0 ≤ Real.sqrt (p * (1 - p)) := Real.sqrt_nonneg _ linarith exact mlsi_tensorization_hypercube hp0 hp1 hρ_nn (fun a b ha hb => mlsi_ge_sharp_log hp0 hp1 ha hb) f hf /-- **HEADLINE THEOREM 13 — Continuous-Time Exponential Entropy Decay (Grönwall–MLSI Decay):** If a smooth relative-entropy trajectory `D : ℝ → ℝ` satisfies the MLSI dissipation inequality `D'(t) ≤ -ρ D(t)` for all `t ≥ 0`, then `D(t) ≤ exp(-ρ t) D(0)` for all `t ≥ 0`! -/ theorem exponential_entropy_decay {ρ : ℝ} {D D' : ℝ → ℝ} (hderiv : ∀ t ≥ 0, HasDerivAt D (D' t) t) (hdiss : ∀ t ≥ 0, D' t ≤ -ρ * D t) {t : ℝ} (ht : 0 ≤ t) : D t ≤ Real.exp (-ρ * t) * D 0 := by set g : ℝ → ℝ := fun s => Real.exp (ρ * s) * D s have hg_deriv : ∀ s ≥ 0, HasDerivAt g (Real.exp (ρ * s) * (ρ * D s + D' s)) s := by intro s hs have he : HasDerivAt (fun r => Real.exp (ρ * r)) (ρ * Real.exp (ρ * s)) s := (((hasDerivAt_id' s).const_mul ρ).exp).congr_deriv (by ring) exact (he.mul (hderiv s hs)).congr_deriv (by ring) have hanti : AntitoneOn g (Set.Ici 0) := antitoneOn_of_deriv_nonpos (convex_Ici 0) (fun s hs => (hg_deriv s hs).continuousAt.continuousWithinAt) (fun s hs => by rw [interior_Ici] at hs exact (hg_deriv s (le_of_lt hs)).differentiableAt.differentiableWithinAt) (fun s hs => by rw [interior_Ici] at hs rw [(hg_deriv s (le_of_lt hs)).deriv] have h1 : ρ * D s + D' s ≤ 0 := by linarith [hdiss s (le_of_lt hs)] exact mul_nonpos_of_nonneg_of_nonpos (le_of_lt (Real.exp_pos _)) h1) have hle : g t ≤ g 0 := hanti Set.self_mem_Ici ht ht simp only [g, mul_zero, Real.exp_zero, one_mul] at hle have hmul := mul_le_mul_of_nonneg_left hle (le_of_lt (Real.exp_pos (-ρ * t))) rw [← mul_assoc, ← Real.exp_add, show -ρ * t + ρ * t = 0 by ring, Real.exp_zero, one_mul] at hmul exact hmul /-- Corollary: Continuous-time Glauber dynamics on `{0, 1}_p^n` decays entropy strictly faster than the Erbar–Maas / Mielke rate `exp(-(1 + 2 √(p (1 - p))) t)` whenever `p ≠ 1/2`! -/ theorem sharp_entropy_decay_strictly_faster_than_erbarMaas {p t : ℝ} (hp0 : 0 < p) (hp1 : p < 1) (hp_ne : p ≠ 1 / 2) (ht : 0 < t) : Real.exp (-sharpMLSILower p * t) < Real.exp (-(1 + 2 * Real.sqrt (p * (1 - p))) * t) := by apply Real.exp_lt_exp.mpr have hgt := sharp_log_gt_erbarMaas hp0 hp1 hp_ne nlinarith end ModifiedLogSobolevSharpBounds end /-! ## Axiom Audit -/ #print axioms ModifiedLogSobolevSharpBounds.dirichletLog_sub_ent_eq #print axioms ModifiedLogSobolevSharpBounds.mlsi_ge_one #print axioms ModifiedLogSobolevSharpBounds.mlsi_ge_erbarMaas #print axioms ModifiedLogSobolevSharpBounds.mlsi_ge_of_onePoint_margin #print axioms ModifiedLogSobolevSharpBounds.onePointMargin_scaleD_nonneg #print axioms ModifiedLogSobolevSharpBounds.mlsi_ge_sharp_log #print axioms ModifiedLogSobolevSharpBounds.sharp_log_gt_erbarMaas #print axioms ModifiedLogSobolevSharpBounds.sharp_log_excess_unbounded_over_erbarMaas #print axioms ModifiedLogSobolevSharpBounds.mlsi_le_dsc_witness #print axioms ModifiedLogSobolevSharpBounds.mlsi_le_log_witness #print axioms ModifiedLogSobolevSharpBounds.dsc_witness_lt_one_add_lsi #print axioms ModifiedLogSobolevSharpBounds.mlsi_sharp_two_sided_sandwich #print axioms ModifiedLogSobolevSharpBounds.diaconis_saloffCoste_lsi #print axioms ModifiedLogSobolevSharpBounds.lsi_attained_at_sq_ratio #print axioms ModifiedLogSobolevSharpBounds.full_spectral_entropy_hierarchy #print axioms ModifiedLogSobolevSharpBounds.entropy_subadditive_hypercube #print axioms ModifiedLogSobolevSharpBounds.mlsi_tensorization_hypercube #print axioms ModifiedLogSobolevSharpBounds.lsi_tensorization_hypercube #print axioms ModifiedLogSobolevSharpBounds.hypercube_mlsi_sharp_log #print axioms ModifiedLogSobolevSharpBounds.exponential_entropy_decay #print axioms ModifiedLogSobolevSharpBounds.sharp_entropy_decay_strictly_faster_than_erbarMaas