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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Seed.Noncollapse.CompactPath |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Seed.Noncollapse.TestHistory |
| 4 | |
| 5 | /-! |
| 6 | # One compact cage for every recent path point |
| 7 | |
| 8 | Restrict the actual whole-component cylinder strictly after its birth. |
| 9 | Its fixed compact image captures all backward paths through the original |
| 10 | terminal center. MT pp. 393-394; seed-retained-confinement.md. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Function |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47 |
| 21 | |
| 22 | open Proofs.M12 Proofs.M46 |
| 23 | |
| 24 | private theorem history_spatial_heq {F : SurgeryFlowData.{u}} |
| 25 | {G : GeneralizedRicciFlowData.{u}} (H : M33RegularHistoryRealization G F) |
| 26 | {s t : ℝ} (hs : s ∈ G.interval) (ht : t ∈ G.interval) |
| 27 | {x : (G.slice s).carrier} {y : (G.slice t).carrier} (hst : s = t) |
| 28 | (h : HEq (H.forward s hs x) (H.forward t ht y)) : HEq x y := by |
| 29 | subst t |
| 30 | exact heq_of_eq ((H.forward_openEmbedding s hs).injective (eq_of_heq h)) |
| 31 | |
| 32 | /-- The compact set is chosen before the path, its duration and its |
| 33 | evaluation age. No action or scalar bound is needed for recent points. -/ |
| 34 | theorem seedRetained_compact_path_trace |
| 35 | {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 36 | (R : M46RegularSpacetimeData W) {T b c : ℝ} |
| 37 | (U : TopologicalSpace.Opens (F.slice T).carrier) |
| 38 | (hcompact : IsCompact (U : Set (F.slice T).carrier)) |
| 39 | (e : SurgeryFlowCylinder F (F.slice T) T 1 (Icc b 0) U) |
| 40 | (hinterval : Icc (T + b) T ⊆ R.history.generalized.interval) |
| 41 | (hbased : ∀ h z, z ∈ U → HEq (e.forward 0 h z) z) |
| 42 | (hT : T ∈ R.history.generalized.interval) |
| 43 | (center : (R.history.generalized.slice T).carrier) (x0 : U) |
| 44 | (hcenter : R.history.history.forward T hT center = x0.val) |
| 45 | (hbc : b < c) (hc : c < 0) : |
| 46 | ∃ K : Set R.geometry.realization.spacetime.Point, IsCompact K ∧ |
| 47 | ∀ {S : ℝ} {endpoint : R.geometry.toLGeometry.Point}, |
| 48 | ∀ path : M14BackwardPath R.geometry.toLGeometry T 0 S |
| 49 | ((R.geometry.sliceIdentification T).identification center).val endpoint, |
| 50 | ∀ {tau : ℝ}, tau ∈ Icc 0 S → tau ≤ -c → path.curve tau ∈ K := by |
| 51 | have hb : b < 0 := hbc.trans hc |
| 52 | let J : SpacetimeInterval := { |
| 53 | domain := Icc c 0 |
| 54 | ordConnected := ordConnected_Icc |
| 55 | nontrivial := ⟨c, ⟨le_rfl, hc.le⟩, 0, ⟨hc.le, le_rfl⟩, hc.ne⟩ } |
| 56 | have hsub : J.domain ⊆ Icc b 0 := Icc_subset_Icc hbc.le le_rfl |
| 57 | let short := e.restrict hsub J.ordConnected (Subset.refl (U : Set (F.slice T).carrier)) |
| 58 | have hclock : ∀ s ∈ J.domain, T + s / 1 ∈ R.history.generalized.interval := by |
| 59 | intro s hs |
| 60 | apply hinterval |
| 61 | simp only [div_one] |
| 62 | exact ⟨by linarith [(hsub hs).1], by linarith [hs.2]⟩ |
| 63 | have hregular : ∀ s hs, short.forward s hs '' (U : Set (F.slice T).carrier) ⊆ |
| 64 | m33RegularRegion F (T + s / 1) := by |
| 65 | intro s hs |
| 66 | exact e.regular_image_of_earlier (hsub hs) |
| 67 | ⟨b, ⟨le_rfl, hb.le⟩, hbc.trans_le hs.1⟩ |
| 68 | obtain ⟨d, hd, _⟩ := R.history.cylinders_from_surgery (F.slice T) T 1 |
| 69 | J.domain U U.isOpen hclock short hregular |
| 70 | have hphysical : (cylinderPhysicalInterval T 1 d.scale_pos J).domain ⊆ |
| 71 | R.history.generalized.interval := by |
| 72 | rintro _ ⟨s, hs, rfl⟩ |
| 73 | exact hclock s hs |
| 74 | have hzero : 0 ∈ J.domain := ⟨hc.le, le_rfl⟩ |
| 75 | have hbase : d.pointMap 0 hzero x0.val = |
| 76 | (⟨T, center⟩ : R.history.generalized.point) := by |
| 77 | apply Sigma.ext (by simp [GeneralizedFlowCylinder.pointMap]) |
| 78 | exact history_spatial_heq R.history.history (hclock 0 hzero) hT (by simp) |
| 79 | ((heq_of_eq (hd 0 hzero x0.val x0.property)).trans |
| 80 | ((hbased (hsub hzero) x0.val x0.property).trans (heq_of_eq hcenter.symm))) |
| 81 | let : CompactSpace J.domain := isCompact_iff_compactSpace.mp isCompact_Icc |
| 82 | let : CompactSpace U := isCompact_iff_compactSpace.mp hcompact |
| 83 | let clock := cylinderClockHomeomorph T 1 d.scale_pos J |
| 84 | let : CompactSpace (cylinderPhysicalInterval T 1 d.scale_pos J).domain := |
| 85 | clock.symm.surjective.compactSpace clock.symm.continuous |
| 86 | refine ⟨range (rawCylinderMap R.geometry.realization d), |
| 87 | isCompact_range (rawCylinderMap_embedding R.geometry.realization d).continuous, ?_⟩ |
| 88 | intro S endpoint path tau htau htauc |
| 89 | let gamma : Icc 0 tau → R.geometry.realization.spacetime.Point := fun s => path.curve s.val |
| 90 | let : PreconnectedSpace (Icc 0 tau) := Subtype.preconnectedSpace isPreconnected_Icc |
| 91 | have hcont : Continuous gamma := continuousOn_iff_continuous_domRestrict.mp |
| 92 | (path.curve_continuous.mono (Icc_subset_Icc le_rfl htau.2)) |
| 93 | have htimeGamma : ∀ s, R.geometry.realization.spacetime.timeFunction (gamma s) ∈ |
| 94 | (cylinderPhysicalInterval T 1 d.scale_pos J).domain := by |
| 95 | intro s |
| 96 | refine ⟨-s.val, ⟨by linarith [s.property.2], neg_nonpos.mpr s.property.1⟩, ?_⟩ |
| 97 | change T + (-s.val) / 1 = (path.curve s.val).1 |
| 98 | have hpathTime : (path.curve s.val).1 = T - s.val := |
| 99 | path.curve_time s.val ⟨s.property.1, s.property.2.trans htau.2⟩ |
| 100 | rw [hpathTime] |
| 101 | ring |
| 102 | have hin : ∃ s, gamma s ∈ range (rawCylinderMap R.geometry.realization d) := by |
| 103 | refine ⟨⟨0, ⟨le_rfl, htau.1⟩⟩, |
| 104 | ⟨((cylinderClockHomeomorph T 1 d.scale_pos J).symm ⟨0, hzero⟩, x0), ?_⟩⟩ |
| 105 | rw [rawCylinderMap_at_parameter, hbase] |
| 106 | change (⟨T, center⟩ : R.history.generalized.point) = path.curve 0 |
| 107 | rw [path.curve_start] |
| 108 | exact ((R.geometry.sliceIdentification T).identification_eq center).symm |
| 109 | exact seedM15_compactCylinder_capture R.geometry.realization d isCompact_Icc |
| 110 | hcompact hphysical gamma hcont htimeGamma hin ⟨tau, ⟨htau.1, le_rfl⟩⟩ |
| 111 | |
| 112 | end PoincareMT.M47 |