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.CapGeometry.InitialIntrinsicProfile |
| 3 | |
| 4 | /-! |
| 5 | # All actual angular-profile jets on the initial radial end |
| 6 | |
| 7 | Morgan-Tian Theorem 12.32, pp. 326-327. The exact zero-order |
| 8 | normalization and the actual positive-order decay are combined before |
| 9 | taking the square. Every retained angular-profile jet therefore has the |
| 10 | precise cylinder limit along moving closed-slab times and radial points. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 18 | |
| 19 | namespace PoincareMT.M35.Uniqueness |
| 20 | |
| 21 | /-- Every actual intrinsic derivative, including order zero, |
| 22 | has its exact limiting value on the closed initial radial end. -/ |
| 23 | theorem initial_intrinsic_radius_jets_tendsto |
| 24 | (P : RicciFlowCurvatureTheory.{0}) {g₀ : StandardInitialMetric} |
| 25 | (E : RepairedStandardCapExistenceData g₀) {theta : ℝ} |
| 26 | (htheta : 0 < theta) (hthetalt : theta < E.flow.base.lifetime) |
| 27 | (t s : ℕ → ℝ) (ht : ∀ k, t k ∈ Icc 0 theta) (hs : ∀ k, 0 < s k) |
| 28 | {t₀ : ℝ} (ht₀ : t₀ < 1) (htlim : Tendsto t atTop (𝓝 t₀)) |
| 29 | (hslim : Tendsto s atTop atTop) (m : ℕ) : |
| 30 | Tendsto (fun k => iteratedDeriv m |
| 31 | (rawWarpingRadius P E.flow.base E.rotation_invariant (t k)) (s k)) |
| 32 | atTop (𝓝 (if m = 0 then Real.sqrt (2 * (1 - t₀)) else 0)) := by |
| 33 | cases m with |
| 34 | | zero => |
| 35 | have h := (Real.continuous_sqrt.tendsto (2 * (1 - t₀))).comp |
| 36 | (initial_intrinsic_squared_radius_tendsto P E htheta hthetalt t s ht hs |
| 37 | ht₀ htlim hslim) |
| 38 | have hpos (k : ℕ) : 0 ≤ rawWarpingRadius P E.flow.base E.rotation_invariant |
| 39 | (t k) (s k) := by |
| 40 | have htime : t k ∈ Ico 0 E.flow.base.lifetime := |
| 41 | ⟨(ht k).1, (ht k).2.trans_lt hthetalt⟩ |
| 42 | rw [rawWarpingRadius_eq P E.flow.base E.rotation_invariant htime] |
| 43 | exact (intrinsicWarpingRadius_pos (E.flow.base.flow.metric (t k)) |
| 44 | (E.rotation_invariant (t k) htime) (E.flow.base.complete P htime) (hs k)).le |
| 45 | simpa only [iteratedDeriv_zero, ite_true, Function.comp_def, Real.sqrt_sq (hpos _)] using h |
| 46 | | succ m => |
| 47 | simpa only [Nat.add_one_ne_zero, ite_false] using |
| 48 | initial_intrinsic_positive_jets_tendsto_zero P E htheta hthetalt t s ht hslim m |
| 49 | |
| 50 | /-- The actual squared radius has the constant-cylinder limit |
| 51 | in every finite intrinsic spatial derivative. -/ |
| 52 | theorem initial_intrinsic_squared_radius_jets_tendsto |
| 53 | (P : RicciFlowCurvatureTheory.{0}) {g₀ : StandardInitialMetric} |
| 54 | (E : RepairedStandardCapExistenceData g₀) {theta : ℝ} |
| 55 | (htheta : 0 < theta) (hthetalt : theta < E.flow.base.lifetime) |
| 56 | (t s : ℕ → ℝ) (ht : ∀ k, t k ∈ Icc 0 theta) (hs : ∀ k, 0 < s k) |
| 57 | {t₀ : ℝ} (ht₀ : t₀ < 1) (htlim : Tendsto t atTop (𝓝 t₀)) |
| 58 | (hslim : Tendsto s atTop atTop) (m : ℕ) : |
| 59 | Tendsto (fun k => iteratedDeriv m |
| 60 | (fun r => rawWarpingRadius P E.flow.base E.rotation_invariant (t k) r ^ 2) (s k)) |
| 61 | atTop (𝓝 (if m = 0 then 2 * (1 - t₀) else 0)) := by |
| 62 | let f k := rawWarpingRadius P E.flow.base E.rotation_invariant (t k) |
| 63 | have hjet := initial_intrinsic_radius_jets_tendsto P E htheta hthetalt t s ht hs |
| 64 | ht₀ htlim hslim |
| 65 | by_cases hm : m = 0 |
| 66 | · subst m |
| 67 | simpa only [iteratedDeriv_zero, ite_true] using |
| 68 | initial_intrinsic_squared_radius_tendsto P E htheta hthetalt t s ht hs |
| 69 | ht₀ htlim hslim |
| 70 | · rw [if_neg hm] |
| 71 | have hf (k : ℕ) : ContDiffAt ℝ m (f k) (s k) := by |
| 72 | have htime : t k ∈ Ico 0 E.flow.base.lifetime := |
| 73 | ⟨(ht k).1, (ht k).2.trans_lt hthetalt⟩ |
| 74 | change ContDiffAt ℝ m (rawWarpingRadius P E.flow.base E.rotation_invariant (t k)) (s k) |
| 75 | rw [rawWarpingRadius_eq P E.flow.base E.rotation_invariant htime] |
| 76 | exact (intrinsicWarpingRadius_contDiff _ _ _).contDiffAt.of_le |
| 77 | (by exact_mod_cast le_top (a := (m : ℕ∞))) |
| 78 | have hterm (i : ℕ) (_hi : i ∈ Finset.range (m + 1)) : |
| 79 | Tendsto (fun k => (m.choose i : ℝ) * iteratedDeriv i (f k) (s k) * |
| 80 | iteratedDeriv (m - i) (f k) (s k)) atTop (𝓝 0) := by |
| 81 | have h := ((hjet i).const_mul (m.choose i : ℝ)).mul (hjet (m - i)) |
| 82 | have hzero : (m.choose i : ℝ) * |
| 83 | (if i = 0 then Real.sqrt (2 * (1 - t₀)) else 0) * |
| 84 | (if m - i = 0 then Real.sqrt (2 * (1 - t₀)) else 0) = 0 := by |
| 85 | by_cases hi0 : i = 0 |
| 86 | · simp only [hi0, ite_true, Nat.sub_zero, if_neg hm, mul_zero] |
| 87 | · simp only [if_neg hi0, mul_zero, zero_mul] |
| 88 | simpa only [hzero, f] using h |
| 89 | have hsum := tendsto_finsetSum (Finset.range (m + 1)) hterm |
| 90 | simp only [Finset.sum_const_zero] at hsum |
| 91 | apply hsum.congr' |
| 92 | apply Eventually.of_forall |
| 93 | intro k |
| 94 | change _ = iteratedDeriv m (fun r => f k r ^ 2) (s k) |
| 95 | simpa only [pow_two] using (iteratedDeriv_fun_mul (hf k) (hf k)).symm |
| 96 | |
| 97 | /-- The same literal jet limit requires positivity only eventually, |
| 98 | as is automatic for an escaping actual intrinsic coordinate. -/ |
| 99 | theorem initial_intrinsic_squared_radius_jets_tendsto_of_escape |
| 100 | (P : RicciFlowCurvatureTheory.{0}) {g₀ : StandardInitialMetric} |
| 101 | (E : RepairedStandardCapExistenceData g₀) {theta : ℝ} |
| 102 | (htheta : 0 < theta) (hthetalt : theta < E.flow.base.lifetime) |
| 103 | (t s : ℕ → ℝ) (ht : ∀ k, t k ∈ Icc 0 theta) |
| 104 | {t₀ : ℝ} (ht₀ : t₀ < 1) (htlim : Tendsto t atTop (𝓝 t₀)) |
| 105 | (hslim : Tendsto s atTop atTop) (m : ℕ) : |
| 106 | Tendsto (fun k => iteratedDeriv m |
| 107 | (fun r => rawWarpingRadius P E.flow.base E.rotation_invariant (t k) r ^ 2) (s k)) |
| 108 | atTop (𝓝 (if m = 0 then 2 * (1 - t₀) else 0)) := by |
| 109 | obtain ⟨n, hn⟩ := eventually_atTop.mp (hslim.eventually_gt_atTop 0) |
| 110 | apply (tendsto_add_atTop_iff_nat n).mp |
| 111 | exact initial_intrinsic_squared_radius_jets_tendsto P E htheta hthetalt |
| 112 | (fun k => t (k + n)) (fun k => s (k + n)) (fun k => ht (k + n)) |
| 113 | (fun k => hn (k + n) (Nat.le_add_left _ _)) ht₀ |
| 114 | (htlim.comp (tendsto_add_atTop_nat n)) (hslim.comp (tendsto_add_atTop_nat n)) m |
| 115 | |
| 116 | end PoincareMT.M35.Uniqueness |