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.CurveShortening.Ramp.LocalFlow.Arbitrary.C2IntrinsicRegularity |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Bounded.CurvatureC2Endpoint |
| 3 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.C2.AdjacentIntervals |
| 4 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Intrinsic.C2LocalExistence |
| 5 | |
| 6 | /-! |
| 7 | # Actual curvature-bounded C2 continuation |
| 8 | |
| 9 | The terminal construction closes the original curve in its original |
| 10 | labels. Actual local existence and the C2 interval join then restart |
| 11 | strictly when the terminal time is interior. MT2007 Claim 19.1, |
| 12 | p. 437, and Lemma 19.14, pp. 446-447; |
| 13 | `2026-09-23-actual-c2-continuation-assembly.md`. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff Bundle |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M63 |
| 25 | |
| 26 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 28 | {a b : ℝ} |
| 29 | |
| 30 | /-- Every actual C2 curve with bounded curvature has a closed |
| 31 | continuation in its original labels, strictly longer at an interior |
| 32 | terminal time. MT2007 Lemma 19.14, pp. 446-447; actual C2 continuation |
| 33 | assembly derivation. -/ |
| 34 | theorem c2ShrinkingCurve_continuation |
| 35 | [T2Space M] (F : RicciFlow n M (Icc a b)) |
| 36 | (hcompact : IsCompact (univ : Set M)) |
| 37 | {T : ℝ} (haT : a < T) (hTb : T ≤ b) |
| 38 | {c : ℝ → ℝ → M} |
| 39 | (hc : M63C2ShrinkingCurveOn F c (Ico a T)) |
| 40 | {K : ℝ} (hK : 0 ≤ K) |
| 41 | (hcurv : ∀ t ∈ Ico a T, ∀ x, m62Curvature F c t x ≤ K) : |
| 42 | ∃ T' : ℝ, T ≤ T' ∧ T' ≤ b ∧ (T < b → T < T') ∧ |
| 43 | ∃ d : ℝ → ℝ → M, M63C2ShrinkingCurveOn F d (Icc a T') ∧ |
| 44 | ∀ t ∈ Ico a T, ∀ x, d x t = c x t := by |
| 45 | classical |
| 46 | have hi := c2ShrinkingCurve_intrinsic_regularity F hcompact haT hTb (Or.inr rfl) hc |
| 47 | obtain ⟨cbar, hcbar, hbar⟩ := |
| 48 | exists_closed_c2_endpoint_of_intrinsic_bounded_curvature F hcompact haT hTb hc hi hK hcurv |
| 49 | by_cases hTb' : T < b |
| 50 | · let : CompactSpace M := isCompact_univ_iff.mp hcompact |
| 51 | let : Nonempty M := ⟨c 0 a⟩ |
| 52 | let FS := m63RestrictClosedFlow F T b (Icc_subset_Icc_left haT.le) hTb' |
| 53 | have hT : T ∈ Icc a T := ⟨haT.le, le_rfl⟩ |
| 54 | obtain ⟨T', hTT', hT'b, q, hq, hqinitial, _hqi⟩ := |
| 55 | exists_intrinsic_c2_local_curve FS (fun x => cbar x T) |
| 56 | (hcbar.periodic T hT) (hcbar.spatial_regular T hT) (hcbar.immersed T hT) |
| 57 | have hqF : M63C2ShrinkingCurveOn F q (Icc T T') := |
| 58 | { domain_subset := fun t ht => ⟨haT.le.trans ht.1, ht.2.trans hT'b.le⟩ |
| 59 | periodic := hq.periodic |
| 60 | spatial_regular := hq.spatial_regular |
| 61 | joint_c1 := hq.joint_c1 |
| 62 | immersed := hq.immersed |
| 63 | continuous := hq.continuous |
| 64 | velocity_continuous := hq.velocity_continuous |
| 65 | curvature_continuous := hq.curvature_continuous |
| 66 | equation := hq.equation } |
| 67 | let d : ℝ → ℝ → M := fun x t => if t ≤ T then cbar x t else q x t |
| 68 | have hleft : M63C2ShrinkingCurveOn F d (Icc a T) := |
| 69 | c2_congr hcbar (fun t ht x => by simp only [d, if_pos ht.2]) |
| 70 | have hright : M63C2ShrinkingCurveOn F d (Icc T T') := by |
| 71 | apply c2_congr hqF |
| 72 | intro t ht x |
| 73 | by_cases htT : t ≤ T |
| 74 | · have htEq : t = T := le_antisymm htT ht.1 |
| 75 | subst t |
| 76 | simpa only [d, if_pos le_rfl] using (hqinitial x).symm |
| 77 | · simp only [d, if_neg htT] |
| 78 | obtain ⟨N, e, he, hemb, hinj⟩ := |
| 79 | exists_embedding_euclidean_of_compact (I := 𝓡 n) (M := M) |
| 80 | obtain ⟨U, ρ, hU, heU, hρ, hρe, _hmin, _huniq⟩ := |
| 81 | exists_smooth_compact_embedded_retraction e hemb he hinj |
| 82 | refine ⟨T', hTT'.le, hT'b.le, fun _ => hTT', d, |
| 83 | c2_of_adjacent_closed_intervals F haT hTT' he hU heU hρ hρe hleft hright, ?_⟩ |
| 84 | intro t ht x |
| 85 | simpa only [d, if_pos ht.2.le] using hbar t ht x |
| 86 | · exact ⟨T, le_rfl, hTb, fun h => (hTb' h).elim, cbar, hcbar, hbar⟩ |
| 87 | |
| 88 | end PoincareMT.M63 |