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 Mathlib.Analysis.SpecialFunctions.ExpDeriv |
| 2 | import Mathlib.Analysis.Calculus.Deriv.MeanValue |
| 3 | |
| 4 | /-! |
| 5 | # The critical-value obstruction for a shrinking surface |
| 6 | |
| 7 | The scalar and Hamilton first integrals give an exponential secant equation |
| 8 | between the two critical values of a rotational soliton potential. Smoothness |
| 9 | at both poles requires opposite Hessian coefficients. Strict convexity of the |
| 10 | exponential rules out distinct critical values satisfying both conditions. |
| 11 | |
| 12 | This is the analytic endpoint of an alternative to the Kazdan--Warner proof of |
| 13 | Chow--Knopf, Proposition 5.21, p. 118, and Cao--Zhu, Proposition 5.1.10. |
| 14 | -/ |
| 15 | |
| 16 | noncomputable section |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | |
| 22 | namespace PoincareMT.SurfaceSoliton |
| 23 | |
| 24 | private theorem exp_secant_derivative_pos {x : ℝ} (hx : 0 < x) : |
| 25 | 0 < (x - 1) * Real.exp x + 1 := by |
| 26 | let F := fun t : ℝ => (t - 1) * Real.exp t + 1 |
| 27 | have hd (t : ℝ) : HasDerivAt F (t * Real.exp t) t := by |
| 28 | dsimp only [F] |
| 29 | convert (((hasDerivAt_id t).sub_const 1).mul (Real.hasDerivAt_exp t)).add_const 1 using 1 <;> |
| 30 | first | rfl | skip |
| 31 | simp only [id_eq] |
| 32 | ring |
| 33 | have hm : StrictMonoOn F (Ici 0) := by |
| 34 | apply strictMonoOn_of_deriv_pos (convex_Ici 0) |
| 35 | (show Continuous F by unfold F; fun_prop).continuousOn |
| 36 | intro t ht |
| 37 | rw [interior_Ici, mem_Ioi] at ht |
| 38 | rw [(hd t).deriv] |
| 39 | exact mul_pos ht (Real.exp_pos t) |
| 40 | have h := hm (show (0 : ℝ) ∈ Ici 0 by simp) (show x ∈ Ici 0 from hx.le) hx |
| 41 | simpa [F] using h |
| 42 | |
| 43 | /-- The trapezoidal exponential mean is strictly larger than the secant |
| 44 | mean on every nondegenerate interval beginning at zero. -/ |
| 45 | theorem exp_secant_lt_endpoint_average {x : ℝ} (hx : 0 < x) : |
| 46 | 2 * (Real.exp x - 1) < x * (Real.exp x + 1) := by |
| 47 | let F := fun t : ℝ => t * (Real.exp t + 1) - 2 * (Real.exp t - 1) |
| 48 | have hd (t : ℝ) : HasDerivAt F ((t - 1) * Real.exp t + 1) t := by |
| 49 | dsimp only [F] |
| 50 | convert ((hasDerivAt_id t).mul ((Real.hasDerivAt_exp t).add_const 1)).sub |
| 51 | (((Real.hasDerivAt_exp t).sub_const 1).const_mul 2) using 1 <;> |
| 52 | first | rfl | skip |
| 53 | simp only [id_eq] |
| 54 | ring |
| 55 | have hm : StrictMonoOn F (Ici 0) := by |
| 56 | apply strictMonoOn_of_deriv_pos (convex_Ici 0) |
| 57 | (show Continuous F by unfold F; fun_prop).continuousOn |
| 58 | intro t ht |
| 59 | rw [interior_Ici, mem_Ioi] at ht |
| 60 | rw [(hd t).deriv] |
| 61 | exact exp_secant_derivative_pos ht |
| 62 | have h := hm (show (0 : ℝ) ∈ Ici 0 by simp) (show x ∈ Ici 0 from hx.le) hx |
| 63 | have h' : 0 < x * (Real.exp x + 1) - 2 * (Real.exp x - 1) := by |
| 64 | simpa [F] using h |
| 65 | linarith |
| 66 | |
| 67 | /-- Exponential first integrals and matching smooth-pole Hessian coefficients |
| 68 | force the two critical values to coincide. -/ |
| 69 | theorem critical_values_eq_of_opposite_slopes {a b A lambda : ℝ} |
| 70 | (hab : a ≤ b) (hA : 0 < A) |
| 71 | (henergy : A * (Real.exp b - Real.exp a) = 2 * lambda * (b - a)) |
| 72 | (hslopes : A * (Real.exp b + Real.exp a) = 4 * lambda) : |
| 73 | a = b := by |
| 74 | by_contra hne |
| 75 | have hd : 0 < b - a := sub_pos.mpr (lt_of_le_of_ne hab hne) |
| 76 | have hstrict := exp_secant_lt_endpoint_average hd |
| 77 | have hpos : 0 < A * Real.exp a := mul_pos hA (Real.exp_pos a) |
| 78 | have hstrict' := mul_lt_mul_of_pos_left hstrict hpos |
| 79 | have hexp : Real.exp a * Real.exp (b - a) = Real.exp b := by |
| 80 | rw [← Real.exp_add] |
| 81 | congr 1 |
| 82 | ring |
| 83 | have hleft : A * Real.exp a * (2 * (Real.exp (b - a) - 1)) = |
| 84 | 2 * (A * (Real.exp b - Real.exp a)) := by |
| 85 | rw [mul_sub, mul_sub] |
| 86 | nlinarith [hexp] |
| 87 | have hright : A * Real.exp a * ((b - a) * (Real.exp (b - a) + 1)) = |
| 88 | (b - a) * (A * (Real.exp b + Real.exp a)) := by |
| 89 | calc |
| 90 | _ = (b - a) * A * (Real.exp a * Real.exp (b - a) + Real.exp a) := by ring |
| 91 | _ = _ := by rw [hexp]; ring |
| 92 | rw [hleft, hright, henergy, hslopes] at hstrict' |
| 93 | nlinarith |
| 94 | |
| 95 | end PoincareMT.SurfaceSoliton |