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.CanonicalInduction.Component.ComponentEstimateGauge |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.RegularHistory |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.History.Transport.SurgeryCylinderRestriction |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.History.Transport.GuardedCylinders |
| 5 | import PoincareLib.Geometry.Riemannian.Curvature.LocalIsometryInvariants |
| 6 | import PoincareLib.Geometry.Riemannian.Curvature.LocalIsometry |
| 7 | |
| 8 | /-! |
| 9 | # The ordinary history strictly after the first tracked time |
| 10 | |
| 11 | Every point has an actual earlier cylinder point, so all included images |
| 12 | are regular. The existing M33 history and M11/M12 gauge give the ordinary |
| 13 | flow with its literal metric, scalar and full-curvature readouts. |
| 14 | Source: Proposition 14.12, p. 350, used on pp. 402-405. |
| 15 | See `proof-work/tasks/M47/derivations/component-estimate.md`, Stage E4. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | |
| 21 | open Set |
| 22 | open scoped Manifold ContDiff Bundle Topology |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.M47 |
| 27 | |
| 28 | /-- The strict-left history of an actual raw cylinder needs no supplied |
| 29 | regularity, cap retention or ordinary-flow premise; pp. 350 and 402-405. -/ |
| 30 | theorem exists_component_strict_ordinary_history |
| 31 | (P : M47Predecessors.{u}) {F : SurgeryFlowData.{u}} |
| 32 | {C : GeneralizedSliceCarrier.{u}} {origin a : ℝ} (ha : a < 0) |
| 33 | (U : TopologicalSpace.Opens C.carrier) (hne : (U : Set C.carrier).Nonempty) |
| 34 | (e : SurgeryFlowCylinder F C origin 1 (Icc a 0) U) : |
| 35 | ∃ G : RicciFlow 3 U (Ioc (origin + a) origin), |
| 36 | ∀ (s : ℝ) (hs : s ∈ Ioc a 0) (x : U), |
| 37 | (∀ v w : TangentSpace (𝓡 3) x, |
| 38 | (F.metric (origin + s / 1)).inner (e.forward s ⟨hs.1.le, hs.2⟩ x.val) |
| 39 | (mfderiv (𝓡 3) (𝓡 3) |
| 40 | (fun y : U => e.forward s ⟨hs.1.le, hs.2⟩ y.val) x v) |
| 41 | (mfderiv (𝓡 3) (𝓡 3) |
| 42 | (fun y : U => e.forward s ⟨hs.1.le, hs.2⟩ y.val) x w) = |
| 43 | (G.metric (origin + s / 1)).inner x v w) ∧ |
| 44 | (G.connection (origin + s / 1)).scalarCurvature x = |
| 45 | (F.connection (origin + s / 1)).scalarCurvature |
| 46 | (e.forward s ⟨hs.1.le, hs.2⟩ x.val) ∧ |
| 47 | (G.connection (origin + s / 1)).curvatureTensorNorm x = |
| 48 | (F.connection (origin + s / 1)).curvatureTensorNorm |
| 49 | (e.forward s ⟨hs.1.le, hs.2⟩ x.val) := by |
| 50 | have haI : a ∈ Icc a 0 := ⟨le_rfl, ha.le⟩ |
| 51 | have h0I : 0 ∈ Icc a 0 := ⟨ha.le, le_rfl⟩ |
| 52 | have hstart : origin + a ∈ F.time_domain := by |
| 53 | simpa only [div_one] using e.time_subset (mem_image_of_mem _ haI) |
| 54 | have hterminal : origin ∈ F.time_domain := by |
| 55 | simpa only [zero_div, add_zero] using e.time_subset (mem_image_of_mem _ h0I) |
| 56 | have horigin : 0 < origin := by |
| 57 | have hnonnegative := F.time_domain_nonnegative hstart |
| 58 | change 0 ≤ origin + a at hnonnegative |
| 59 | linarith |
| 60 | obtain ⟨x0, _hx0⟩ := hne |
| 61 | have hnonempty : Nonempty (F.slice origin).carrier := by |
| 62 | have h : Nonempty (F.slice (origin + 0 / 1)).carrier := ⟨e.forward 0 h0I x0⟩ |
| 63 | simpa only [zero_div, add_zero] using h |
| 64 | let W := F.closedRegularHistoryWindow origin horigin hterminal hnonempty |
| 65 | obtain ⟨H⟩ := P.regular_history F W |
| 66 | let J : SpacetimeInterval := { |
| 67 | domain := Ioc a 0 |
| 68 | ordConnected := ordConnected_Ioc |
| 69 | nontrivial := ⟨a / 2, ⟨by linarith, by linarith⟩, |
| 70 | 0, ⟨ha, le_rfl⟩, by linarith⟩ |
| 71 | } |
| 72 | let short := e.restrict Ioc_subset_Icc_self J.ordConnected (Subset.refl (U : Set C.carrier)) |
| 73 | have htime : ∀ s ∈ J.domain, origin + s / 1 ∈ W.interval := by |
| 74 | intro s hs |
| 75 | have ht := e.time_subset (mem_image_of_mem _ (Ioc_subset_Icc_self hs)) |
| 76 | exact ⟨F.time_domain_nonnegative ht, by |
| 77 | have h := hs.2 |
| 78 | change origin + s / 1 ≤ origin |
| 79 | simp only [div_one] |
| 80 | linarith⟩ |
| 81 | have hregular : ∀ s hs, short.forward s hs '' (U : Set C.carrier) ⊆ |
| 82 | m33RegularRegion F (origin + s / 1) := by |
| 83 | intro s hs |
| 84 | exact e.regular_image_of_earlier (Ioc_subset_Icc_self hs) ⟨a, haI, hs.1⟩ |
| 85 | obtain ⟨G0, hmetric⟩ := exists_component_regular_cylinder_ordinary P H short htime hregular |
| 86 | have hsub : Ioc (origin + a) origin ⊆ |
| 87 | (fun s : ℝ => origin + s / 1) '' J.domain := by |
| 88 | intro t ht |
| 89 | refine ⟨t - origin, ⟨by linarith [ht.1], by linarith [ht.2]⟩, ?_⟩ |
| 90 | simp only [div_one, add_sub_cancel] |
| 91 | let G : RicciFlow 3 U (Ioc (origin + a) origin) := { |
| 92 | metric := G0.metric |
| 93 | connection := G0.connection |
| 94 | interval := ordConnected_Ioc |
| 95 | nontrivial := ⟨origin + a / 2, ⟨by linarith, by linarith⟩, |
| 96 | origin, ⟨by linarith, le_rfl⟩, by linarith⟩ |
| 97 | smooth := G0.smooth.mono (Set.prod_mono hsub Subset.rfl) |
| 98 | equation := fun t ht x v w => (G0.equation t (hsub ht) x v w).mono hsub |
| 99 | } |
| 100 | refine ⟨G, ?_⟩ |
| 101 | intro s hs x |
| 102 | have hf : ContMDiff (𝓡 3) (𝓡 3) ∞ |
| 103 | (fun y : U => e.forward s ⟨hs.1.le, hs.2⟩ y.val) := by |
| 104 | intro y |
| 105 | exact ((e.forward_smooth s ⟨hs.1.le, hs.2⟩ y.val y.property).contMDiffAt |
| 106 | (U.isOpen.mem_nhds y.property)).comp y (contMDiff_subtype_val (n := ∞) y) |
| 107 | have hm : ∀ y : U, ∀ v w : TangentSpace (𝓡 3) y, |
| 108 | (G.metric (origin + s / 1)).inner y v w = |
| 109 | (F.metric (origin + s / 1)).inner (e.forward s ⟨hs.1.le, hs.2⟩ y.val) |
| 110 | (mfderiv (𝓡 3) (𝓡 3) |
| 111 | (fun z : U => e.forward s ⟨hs.1.le, hs.2⟩ z.val) y v) |
| 112 | (mfderiv (𝓡 3) (𝓡 3) |
| 113 | (fun z : U => e.forward s ⟨hs.1.le, hs.2⟩ z.val) y w) := |
| 114 | fun y v w => (hmetric s hs y v w).symm |
| 115 | refine ⟨fun v w => (hm x v w).symm, ?_, ?_⟩ |
| 116 | · exact (G.connection (origin + s / 1)).scalarCurvature_eq_of_local_isometry |
| 117 | (F.connection (origin + s / 1)) isOpen_univ hf.contMDiffOn |
| 118 | (fun y _hy => hm y) (mem_univ x) |
| 119 | · exact (G.connection (origin + s / 1)).curvatureTensorNorm_eq_of_local_isometry |
| 120 | (F.connection (origin + s / 1)) isOpen_univ hf.contMDiffOn |
| 121 | (fun y _hy => hm y) (mem_univ x) |
| 122 | |
| 123 | end PoincareMT.M47 |