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.Convex.Deriv |
| 2 | import Mathlib.Analysis.Convex.Jensen |
| 3 | |
| 4 | /-! |
| 5 | # Zero-endpoint uniqueness for a nonnegative scalar potential |
| 6 | |
| 7 | The square of a solution is convex, requiring no derivative at either |
| 8 | endpoint. This is the radial-mode step in the annular Hopf argument of |
| 9 | Lemaire 1982, Lemma 5.1, p. 99; see M64 derivation |
| 10 | `2026-09-26-raw-harmonic-stress.md`. |
| 11 | |
| 12 | Morgan--Tian context: Lemma 19.15, printed pp. 447-449. This project analytic helper |
| 13 | supports the actual annular minimizer and boundary regularity construction. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option warningAsError true |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | /-- A scalar equation `f'' = q*f` with nonnegative potential and zero |
| 25 | endpoint values has only the zero solution. Actual derivative fields |
| 26 | are used only in the interior. Source: the radial-mode argument in |
| 27 | M64's raw-harmonic-stress derivation for Lemaire, Lemma 5.1, p. 99. -/ |
| 28 | theorem m64Dirichlet_nonnegative_potential_eq_zero |
| 29 | {a b : ℝ} {f v q : ℝ → ℝ} |
| 30 | (hf : ContinuousOn f (Icc a b)) |
| 31 | (hfv : ∀ x ∈ Ioo a b, HasDerivAt f (v x) x) |
| 32 | (hvq : ∀ x ∈ Ioo a b, HasDerivAt v (q x * f x) x) |
| 33 | (hq : ∀ x ∈ Ioo a b, 0 ≤ q x) (ha : f a = 0) (hb : f b = 0) : |
| 34 | EqOn f (fun _ => 0) (Icc a b) := by |
| 35 | have hfirst (x : ℝ) (hx : x ∈ Ioo a b) : |
| 36 | HasDerivAt (fun t => f t ^ 2) (2 * (f x * v x)) x := by |
| 37 | have hd : HasDerivAt (fun t => f t * f t) (v x * f x + f x * v x) x := |
| 38 | (hfv x hx).mul (hfv x hx) |
| 39 | have heq : v x * f x + f x * v x = 2 * (f x * v x) := by ring |
| 40 | simpa only [heq, pow_two] using hd |
| 41 | have hsecond (x : ℝ) (hx : x ∈ Ioo a b) : |
| 42 | HasDerivAt (fun t => 2 * (f t * v t)) |
| 43 | (2 * (v x ^ 2 + q x * f x ^ 2)) x := by |
| 44 | have hd : HasDerivAt (fun t => 2 * (f t * v t)) |
| 45 | (2 * (v x * v x + f x * (q x * f x))) x := |
| 46 | ((hfv x hx).mul (hvq x hx)).const_mul 2 |
| 47 | convert hd using 1 |
| 48 | ring |
| 49 | have hconv : ConvexOn ℝ (Icc a b) (fun x => f x ^ 2) := by |
| 50 | apply convexOn_of_hasDerivWithinAt2_nonneg (convex_Icc a b) (hf.pow 2) |
| 51 | (f' := fun x => 2 * (f x * v x)) |
| 52 | (f'' := fun x => 2 * (v x ^ 2 + q x * f x ^ 2)) |
| 53 | · intro x hx |
| 54 | exact (hfirst x (by simpa only [interior_Icc] using hx)).hasDerivWithinAt |
| 55 | · intro x hx |
| 56 | exact (hsecond x (by simpa only [interior_Icc] using hx)).hasDerivWithinAt |
| 57 | · intro x hx |
| 58 | have hqx := hq x (by simpa only [interior_Icc] using hx) |
| 59 | positivity |
| 60 | intro x hx |
| 61 | have hab := hx.1.trans hx.2 |
| 62 | have hle := hconv.le_max_of_mem_Icc (left_mem_Icc.mpr hab) (right_mem_Icc.mpr hab) hx |
| 63 | simp only [ha, hb, zero_pow (by decide : 2 ≠ 0), max_self] at hle |
| 64 | exact sq_eq_zero_iff.mp (le_antisymm hle (sq_nonneg _)) |
| 65 | |
| 66 | end PoincareMT |