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.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.TerminalBlowup.Mathlib.ConcaveRadius |
| 3 | |
| 4 | /-! |
| 5 | # Radius bounds without inverting the intrinsic coordinate |
| 6 | |
| 7 | Morgan-Tian Section 12.6, pp. 307-309, and Proposition 12.31, |
| 8 | pp. 325-326. The positive radial speed changes derivatives by the chain |
| 9 | rule. An unbounded arclength function is sufficient for the concavity |
| 10 | argument, so no inverse radial coordinate is needed. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | |
| 17 | namespace PoincareMT.M35 |
| 18 | |
| 19 | private theorem false_of_nonneg_of_weighted_negative_deriv |
| 20 | {f f₁ s v : ℝ → ℝ} {a C : ℝ} (hC : C < 0) |
| 21 | (hpos : ∀ r, a ≤ r → 0 ≤ f r) |
| 22 | (hderiv : ∀ r, a ≤ r → HasDerivAt f (v r * f₁ r) r) |
| 23 | (hs : ∀ r, a ≤ r → HasDerivAt s (v r) r) |
| 24 | (hv : ∀ r, a ≤ r → 0 ≤ v r) |
| 25 | (hsinf : Tendsto s atTop atTop) |
| 26 | (hbound : ∀ r, a ≤ r → f₁ r ≤ C) : False := by |
| 27 | let F (r : ℝ) := f r - C * s r |
| 28 | have hd (r : ℝ) (hr : r ∈ Ici a) : |
| 29 | HasDerivAt F (v r * (f₁ r - C)) r := by |
| 30 | convert! (hderiv r hr).sub ((hs r hr).const_mul C) using 1 |
| 31 | ring |
| 32 | have hanti : AntitoneOn F (Ici a) := |
| 33 | antitoneOn_of_hasDerivWithinAt_nonpos (convex_Ici a) |
| 34 | (fun r hr => (hd r hr).continuousAt.continuousWithinAt) |
| 35 | (fun r hr => (hd r (interior_subset hr)).hasDerivWithinAt) |
| 36 | (fun r hr => mul_nonpos_of_nonneg_of_nonpos |
| 37 | (hv r (interior_subset hr)) (sub_nonpos.mpr (hbound r (interior_subset hr)))) |
| 38 | obtain ⟨b, hb, hslarge⟩ := |
| 39 | ((eventually_ge_atTop a).and |
| 40 | (hsinf.eventually (eventually_gt_atTop (s a + (f a + 1) / (-C))))).exists |
| 41 | have hdiff : (f a + 1) / (-C) < s b - s a := by linarith |
| 42 | have hmul := (div_lt_iff₀ (neg_pos.mpr hC)).mp hdiff |
| 43 | have h := hanti (by simp) hb hb |
| 44 | dsimp only [F] at h |
| 45 | nlinarith [hpos b hb] |
| 46 | |
| 47 | /-- Section 12.6: in the original radial parameter, positivity, |
| 48 | nonpositive intrinsic second derivative, and infinite arclength force |
| 49 | the intrinsic first derivative to be nonnegative. -/ |
| 50 | theorem weighted_radial_derivative_nonneg |
| 51 | {f f₁ f₂ s v : ℝ → ℝ} |
| 52 | (hpos : ∀ r, 0 < r → 0 < f r) |
| 53 | (hderiv : ∀ r, 0 < r → HasDerivAt f (v r * f₁ r) r) |
| 54 | (hderiv₂ : ∀ r, 0 < r → HasDerivAt f₁ (v r * f₂ r) r) |
| 55 | (hs : ∀ r, 0 < r → HasDerivAt s (v r) r) |
| 56 | (hv : ∀ r, 0 < r → 0 < v r) |
| 57 | (hsinf : Tendsto s atTop atTop) |
| 58 | (hconcave : ∀ r, 0 < r → f₂ r ≤ 0) |
| 59 | {r : ℝ} (hr : 0 < r) : 0 ≤ f₁ r := by |
| 60 | have hanti : AntitoneOn f₁ (Ioi 0) := |
| 61 | antitoneOn_of_hasDerivWithinAt_nonpos (convex_Ioi 0) |
| 62 | (fun u hu => (hderiv₂ u hu).continuousAt.continuousWithinAt) |
| 63 | (fun u hu => (hderiv₂ u (interior_subset hu)).hasDerivWithinAt) |
| 64 | (fun u hu => mul_nonpos_of_nonneg_of_nonpos |
| 65 | (hv u (interior_subset hu)).le (hconcave u (interior_subset hu))) |
| 66 | by_contra hneg |
| 67 | exact false_of_nonneg_of_weighted_negative_deriv (lt_of_not_ge hneg) |
| 68 | (fun u hu => (hpos u (hr.trans_le hu)).le) |
| 69 | (fun u hu => hderiv u (hr.trans_le hu)) |
| 70 | (fun u hu => hs u (hr.trans_le hu)) |
| 71 | (fun u hu => (hv u (hr.trans_le hu)).le) hsinf |
| 72 | (fun u hu => hanti hr (hr.trans_le hu) hu) |
| 73 | |
| 74 | /-- Proposition 12.31: an eventual scalar floor bounds the actual |
| 75 | warping radius in any positive-speed parameter with unbounded arclength. -/ |
| 76 | theorem weighted_radial_radius_sq_le_of_eventual_scalar_floor |
| 77 | {f f₁ f₂ s v : ℝ → ℝ} |
| 78 | (hpos : ∀ r, 0 < r → 0 < f r) |
| 79 | (hderiv : ∀ r, 0 < r → HasDerivAt f (v r * f₁ r) r) |
| 80 | (hderiv₂ : ∀ r, 0 < r → HasDerivAt f₁ (v r * f₂ r) r) |
| 81 | (hs : ∀ r, 0 < r → HasDerivAt s (v r) r) |
| 82 | (hv : ∀ r, 0 < r → 0 < v r) |
| 83 | (hsinf : Tendsto s atTop atTop) |
| 84 | (hconcave : ∀ r, 0 < r → f₂ r ≤ 0) |
| 85 | {c : ℝ} (hc : 0 < c) |
| 86 | (hfloor : ∀ᶠ r in atTop, |
| 87 | c ≤ 2 * (1 - (f₁ r) ^ 2) / (f r) ^ 2 - 4 * f₂ r / f r) |
| 88 | {r : ℝ} (hr : 0 < r) : (f r) ^ 2 ≤ 2 / c := by |
| 89 | have hnonneg (u : ℝ) (hu : 0 < u) : 0 ≤ f₁ u := |
| 90 | weighted_radial_derivative_nonneg hpos hderiv hderiv₂ hs hv hsinf hconcave hu |
| 91 | have hmono : MonotoneOn f (Ioi 0) := |
| 92 | monotoneOn_of_hasDerivWithinAt_nonneg (convex_Ioi 0) |
| 93 | (fun u hu => (hderiv u hu).continuousAt.continuousWithinAt) |
| 94 | (fun u hu => (hderiv u (interior_subset hu)).hasDerivWithinAt) |
| 95 | (fun u hu => mul_nonneg (hv u (interior_subset hu)).le |
| 96 | (hnonneg u (interior_subset hu))) |
| 97 | by_contra hbad |
| 98 | have hlarge : 2 < c * (f r) ^ 2 := by |
| 99 | have h := (div_lt_iff₀ hc).mp (lt_of_not_ge hbad) |
| 100 | nlinarith |
| 101 | let C := (2 / f r - c * f r) / 4 |
| 102 | have hC : C < 0 := by |
| 103 | apply div_neg_of_neg_of_pos _ (by norm_num : (0 : ℝ) < 4) |
| 104 | apply sub_neg.mpr |
| 105 | apply (div_lt_iff₀ (hpos r hr)).mpr |
| 106 | nlinarith |
| 107 | obtain ⟨a, ha⟩ := eventually_atTop.mp hfloor |
| 108 | let b := max a r |
| 109 | have hrb : r ≤ b := le_max_right _ _ |
| 110 | have hab : a ≤ b := le_max_left _ _ |
| 111 | apply false_of_nonneg_of_weighted_negative_deriv |
| 112 | (f := f₁) (f₁ := f₂) hC |
| 113 | (fun u hu => hnonneg u (hr.trans_le (hrb.trans hu))) |
| 114 | (fun u hu => hderiv₂ u (hr.trans_le (hrb.trans hu))) |
| 115 | (fun u hu => hs u (hr.trans_le (hrb.trans hu))) |
| 116 | (fun u hu => (hv u (hr.trans_le (hrb.trans hu))).le) hsinf |
| 117 | intro u hu |
| 118 | have hru : r ≤ u := hrb.trans hu |
| 119 | have hupos : 0 < f u := hpos u (hr.trans_le hru) |
| 120 | have hfu : f r ≤ f u := hmono hr (hr.trans_le hru) hru |
| 121 | have hscaled := mul_le_mul_of_nonneg_right (ha u (hab.trans hu)) (sq_nonneg (f u)) |
| 122 | have heq : |
| 123 | (2 * (1 - (f₁ u) ^ 2) / (f u) ^ 2 - 4 * f₂ u / f u) * (f u) ^ 2 = |
| 124 | 2 * (1 - (f₁ u) ^ 2) - 4 * f₂ u * f u := by |
| 125 | field_simp [hupos.ne'] |
| 126 | rw [heq] at hscaled |
| 127 | have hsecond : 4 * f₂ u ≤ 2 / f u - c * f u := by |
| 128 | apply le_of_mul_le_mul_right (a := f u) _ hupos |
| 129 | have hcancel : 2 / f u * f u = 2 := div_mul_cancel₀ _ hupos.ne' |
| 130 | nlinarith [sq_nonneg (f₁ u)] |
| 131 | have hinv : 2 / f u ≤ 2 / f r := |
| 132 | div_le_div_of_nonneg_left (by norm_num) (hpos r hr) hfu |
| 133 | have hmul : c * f r ≤ c * f u := mul_le_mul_of_nonneg_left hfu hc.le |
| 134 | dsimp only [C] |
| 135 | linarith |
| 136 | |
| 137 | end PoincareMT.M35 |