Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | import PoincareLib.Geometry.RicciFlow.Surgery.Metric.Collapse.CollapseMetric |
| 2 | |
| 3 | /-! |
| 4 | # Quantitative size of the conformal metric change |
| 5 | |
| 6 | The profile and its tip regularization on Morgan--Tian p.332 are |
| 7 | uniformly bounded between exp(-2*C*epsilon) and one. A threshold |
| 8 | depending only on C and A0 gives the strict ball margins in Lemma 13.4. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | namespace PoincareMT.MetricSurgery |
| 14 | |
| 15 | theorem flat_exponential_le_one (x : ℝ) : expNegInvGlue x ≤ 1 := by |
| 16 | by_cases hx : x ≤ 0 |
| 17 | · simp [expNegInvGlue, hx] |
| 18 | · rw [expNegInvGlue, if_neg hx] |
| 19 | exact Real.exp_le_one_iff.mpr (neg_nonpos.mpr (inv_nonneg.mpr (le_of_not_ge hx))) |
| 20 | |
| 21 | theorem smoothProfile_le {C epsilon : ℝ} (hC : 0 ≤ C) (hepsilon : 0 ≤ epsilon) |
| 22 | (q s : ℝ) : smoothProfile C q epsilon s ≤ C * epsilon := by |
| 23 | unfold smoothProfile |
| 24 | simpa only [mul_one] using |
| 25 | mul_le_mul_of_nonneg_left (flat_exponential_le_one (s / q)) (mul_nonneg hC hepsilon) |
| 26 | |
| 27 | theorem conformalFactor_ge_exp {C epsilon : ℝ} (hC : 0 ≤ C) (hepsilon : 0 ≤ epsilon) |
| 28 | (q s : ℝ) : Real.exp (-2 * C * epsilon) ≤ conformalFactor C q epsilon s := by |
| 29 | unfold conformalFactor |
| 30 | apply Real.exp_le_exp.mpr |
| 31 | linarith [smoothProfile_le hC hepsilon q s] |
| 32 | |
| 33 | theorem radialConformalMultiplier_ge_exp (g₀ : StandardInitialMetric) |
| 34 | {C epsilon : ℝ} (hC : 0 ≤ C) (hepsilon : 0 ≤ epsilon) |
| 35 | (q r : ℝ) (x : StandardCapSpace) : |
| 36 | Real.exp (-2 * C * epsilon) ≤ radialConformalMultiplier g₀ C q epsilon r x := by |
| 37 | have hb := radialTipWeight_bounds g₀ r x |
| 38 | have hn := mul_le_mul_of_nonneg_left |
| 39 | (conformalFactor_ge_exp hC hepsilon q (standardSurgeryHeight g₀ x)) hb.1 |
| 40 | have ht := mul_le_mul_of_nonneg_left |
| 41 | (conformalFactor_ge_exp hC hepsilon q (g₀.cylindrical_end.radius + 4)) |
| 42 | (sub_nonneg.mpr hb.2) |
| 43 | unfold radialConformalMultiplier |
| 44 | calc |
| 45 | _ = radialTipWeight g₀ r x * Real.exp (-2 * C * epsilon) + |
| 46 | (1 - radialTipWeight g₀ r x) * Real.exp (-2 * C * epsilon) := by ring |
| 47 | _ ≤ _ := add_le_add hn ht |
| 48 | |
| 49 | theorem surgery_ball_factor_margins {A C epsilon : ℝ} |
| 50 | (hA : 1 < A) (hC : 0 ≤ C) (hepsilon : 0 ≤ epsilon) |
| 51 | (heta : 0 < 1 - 6 * epsilon) |
| 52 | (hsmall : epsilon ≤ 1 / (A * (6 + 2 * C))) : |
| 53 | A - 1 < Real.sqrt ((1 - 6 * epsilon) * Real.exp (-2 * C * epsilon)) * A ∧ |
| 54 | Real.sqrt (1 + 6 * epsilon) * A < A + 1 := by |
| 55 | have hApos : 0 < A := by linarith |
| 56 | have hDpos : 0 < 6 + 2 * C := by linarith |
| 57 | have hproduct : epsilon * (A * (6 + 2 * C)) ≤ 1 := |
| 58 | (le_div_iff₀ (mul_pos hApos hDpos)).mp hsmall |
| 59 | have hexp := Real.add_one_le_exp (-2 * C * epsilon) |
| 60 | have hbeta : 1 - (6 + 2 * C) * epsilon ≤ |
| 61 | (1 - 6 * epsilon) * Real.exp (-2 * C * epsilon) := by |
| 62 | have h := mul_le_mul_of_nonneg_left hexp heta.le |
| 63 | have hcross : 0 ≤ C * epsilon ^ 2 := mul_nonneg hC (sq_nonneg epsilon) |
| 64 | nlinarith |
| 65 | have hbetapos := mul_pos heta (Real.exp_pos (-2 * C * epsilon)) |
| 66 | have htim := mul_le_mul_of_nonneg_right hproduct hApos.le |
| 67 | have hbetatim := mul_le_mul_of_nonneg_right hbeta (sq_nonneg A) |
| 68 | have hbetasq : (A - 1) ^ 2 < |
| 69 | ((1 - 6 * epsilon) * Real.exp (-2 * C * epsilon)) * A ^ 2 := by |
| 70 | nlinarith |
| 71 | have hsix : 6 * epsilon * A ≤ 1 := by |
| 72 | have hcross : 0 ≤ 2 * C * epsilon * A := by positivity |
| 73 | nlinarith |
| 74 | have hsixtim := mul_le_mul_of_nonneg_right hsix hApos.le |
| 75 | have hupsq : (1 + 6 * epsilon) * A ^ 2 < (A + 1) ^ 2 := by nlinarith |
| 76 | constructor |
| 77 | · have hsquare : |
| 78 | (Real.sqrt ((1 - 6 * epsilon) * Real.exp (-2 * C * epsilon)) * A) ^ 2 = |
| 79 | ((1 - 6 * epsilon) * Real.exp (-2 * C * epsilon)) * A ^ 2 := by |
| 80 | rw [mul_pow, Real.sq_sqrt hbetapos.le] |
| 81 | have hnonneg := mul_nonneg |
| 82 | (Real.sqrt_nonneg ((1 - 6 * epsilon) * Real.exp (-2 * C * epsilon))) hApos.le |
| 83 | nlinarith |
| 84 | · have hsquare : (Real.sqrt (1 + 6 * epsilon) * A) ^ 2 = (1 + 6 * epsilon) * A ^ 2 := by |
| 85 | rw [mul_pow, Real.sq_sqrt (by positivity)] |
| 86 | have hnonneg := mul_nonneg (Real.sqrt_nonneg (1 + 6 * epsilon)) hApos.le |
| 87 | nlinarith |
| 88 | |
| 89 | end PoincareMT.MetricSurgery |