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.Induction.Noncollapse.Compat.GeneralizedEquation |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.CylinderLocalInverse |
| 3 | |
| 4 | /-! |
| 5 | # The actual source frontier at a cap-entry endpoint |
| 6 | |
| 7 | Proposition 16.13, pp. 377-378. Finite-energy completion provides a |
| 8 | continuous physical coordinate. At an included clock and a source |
| 9 | coordinate still in the open source, actual raw-cylinder continuity |
| 10 | recovers the endpoint itself. Hence an excluded entry point forces a |
| 11 | source frontier point. This conclusion concerns the literal source U. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter Function |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.Proofs.M12 |
| 23 | end PoincareMT.Proofs.M12 |
| 24 | open PoincareMT.EpochExtension.Spacetime |
| 25 | local notation "GeneralizedFlowCarrierConclusion" => PoincareMT.GeneralizedFlowCarrierConclusionWithInterval |
| 26 | |
| 27 | namespace PoincareMT.Proofs.M46 |
| 28 | |
| 29 | open PoincareMT.Proofs.M12 |
| 30 | |
| 31 | variable {F : GeneralizedRicciFlowData.{u}} |
| 32 | (R : GeneralizedFlowCarrierConclusion (flowBoxAtlas F)) |
| 33 | {C : GeneralizedSliceCarrier.{u}} {origin scale : ℝ} {J : SpacetimeInterval} |
| 34 | {U : TopologicalSpace.Opens C.carrier} |
| 35 | (e : GeneralizedFlowCylinder F C origin scale J.domain U) |
| 36 | |
| 37 | /-- At an actual tracked endpoint, the continuous completion recovers |
| 38 | its known physical source coordinate. Source: Proposition 16.13, |
| 39 | pp. 377-378. -/ |
| 40 | theorem rawCylinder_completed_coordinate_eq |
| 41 | {a b r : ℝ} (hab : a < b) (hr : r ∈ Icc a b) |
| 42 | {gamma : ℝ → R.spacetime.Point} {xi : ℝ → C.carrier} |
| 43 | (hgamma : ContinuousOn gamma (Icc a b)) (hxi : ContinuousOn xi (Icc a b)) |
| 44 | (beta : ℝ → (R.timeIntervals.interval |
| 45 | (cylinderPhysicalInterval origin scale e.scale_pos J)).Point × U) |
| 46 | (heq : EqOn (rawCylinderMap R e ∘ beta) gamma (Ioo a b)) |
| 47 | (hcoordinate : EqOn (fun t => (beta t).2.val) xi (Ioo a b)) |
| 48 | (p : (R.timeIntervals.interval |
| 49 | (cylinderPhysicalInterval origin scale e.scale_pos J)).Point × U) |
| 50 | (hp : gamma r = rawCylinderMap R e p) : xi r = p.2.val := by |
| 51 | let : NeBot (𝓝[Ioo a b] r) := mem_closure_iff_nhdsWithin_neBot.mp |
| 52 | (by simpa only [closure_Ioo hab.ne] using hr) |
| 53 | have hg := (hgamma r hr).mono Ioo_subset_Icc_self |
| 54 | have hx := (hxi r hr).mono Ioo_subset_Icc_self |
| 55 | have hraw : Tendsto (rawCylinderMap R e ∘ beta) (𝓝[Ioo a b] r) |
| 56 | (𝓝 (rawCylinderMap R e p)) := by |
| 57 | rw [← hp] |
| 58 | apply hg.congr' |
| 59 | filter_upwards [self_mem_nhdsWithin] with t ht |
| 60 | exact (heq ht).symm |
| 61 | have hbeta : Tendsto beta (𝓝[Ioo a b] r) (𝓝 p) := |
| 62 | (rawCylinderMap_embedding R e).isInducing.tendsto_nhds_iff.mpr hraw |
| 63 | have hspatial : Tendsto (fun t => (beta t).2.val) (𝓝[Ioo a b] r) (𝓝 p.2.val) := |
| 64 | (continuous_subtype_val.comp continuous_snd).continuousAt.tendsto.comp hbeta |
| 65 | have hfinal : Tendsto xi (𝓝[Ioo a b] r) (𝓝 p.2.val) := by |
| 66 | apply hspatial.congr' |
| 67 | filter_upwards [self_mem_nhdsWithin] with t ht |
| 68 | exact hcoordinate ht |
| 69 | exact tendsto_nhds_unique hx hfinal |
| 70 | |
| 71 | /-- If the completed coordinate and clock are still in the actual |
| 72 | source, its image is the original endpoint. Source: Proposition 16.13, |
| 73 | pp. 377-378. -/ |
| 74 | theorem rawCylinder_completed_endpoint_eq |
| 75 | {a b r : ℝ} (hab : a < b) (hr : r ∈ Icc a b) |
| 76 | {gamma : ℝ → R.spacetime.Point} {xi : ℝ → C.carrier} |
| 77 | (hgamma : ContinuousOn gamma (Icc a b)) (hxi : ContinuousOn xi (Icc a b)) |
| 78 | (beta : ℝ → (R.timeIntervals.interval |
| 79 | (cylinderPhysicalInterval origin scale e.scale_pos J)).Point × U) |
| 80 | (heq : EqOn (rawCylinderMap R e ∘ beta) gamma (Ioo a b)) |
| 81 | (hcoordinate : EqOn (fun t => (beta t).2.val) xi (Ioo a b)) |
| 82 | (hclock : ∀ t ∈ Ioo a b, (beta t).1.val = R.spacetime.timeFunction (gamma t)) |
| 83 | (hrclock : R.spacetime.timeFunction (gamma r) ∈ |
| 84 | (cylinderPhysicalInterval origin scale e.scale_pos J).domain) |
| 85 | (hrsource : xi r ∈ U) : |
| 86 | gamma r = rawCylinderMap R e |
| 87 | (⟨R.spacetime.timeFunction (gamma r), hrclock⟩, ⟨xi r, hrsource⟩) := by |
| 88 | let : ChartedSpace (ModelProd (EuclideanHalfSpace 1) (EuclideanSpace ℝ (Fin 3))) |
| 89 | F.point := R.spacetime.chartedSpace |
| 90 | let : NeBot (𝓝[Ioo a b] r) := mem_closure_iff_nhdsWithin_neBot.mp |
| 91 | (by simpa only [closure_Ioo hab.ne] using hr) |
| 92 | have hg := (hgamma r hr).mono Ioo_subset_Icc_self |
| 93 | have hx := (hxi r hr).mono Ioo_subset_Icc_self |
| 94 | have htime : Tendsto (fun t => (beta t).1) (𝓝[Ioo a b] r) |
| 95 | (𝓝 (⟨R.spacetime.timeFunction (gamma r), hrclock⟩ : |
| 96 | (R.timeIntervals.interval |
| 97 | (cylinderPhysicalInterval origin scale e.scale_pos J)).Point)) := by |
| 98 | apply Topology.IsInducing.subtypeVal.tendsto_nhds_iff.mpr |
| 99 | apply (R.spacetime.time_smooth.continuous.continuousAt.tendsto.comp hg).congr' |
| 100 | filter_upwards [self_mem_nhdsWithin] with t ht |
| 101 | exact (hclock t ht).symm |
| 102 | have hspace : Tendsto (fun t => (beta t).2) (𝓝[Ioo a b] r) |
| 103 | (𝓝 (⟨xi r, hrsource⟩ : U)) := by |
| 104 | apply Topology.IsInducing.subtypeVal.tendsto_nhds_iff.mpr |
| 105 | apply hx.congr' |
| 106 | filter_upwards [self_mem_nhdsWithin] with t ht |
| 107 | exact (hcoordinate ht).symm |
| 108 | have hraw := (rawCylinderMap_embedding R e).continuous.continuousAt.tendsto.comp |
| 109 | (htime.prodMk_nhds hspace) |
| 110 | have hfinal : Tendsto gamma (𝓝[Ioo a b] r) |
| 111 | (𝓝 (rawCylinderMap R e |
| 112 | (⟨R.spacetime.timeFunction (gamma r), hrclock⟩, ⟨xi r, hrsource⟩))) := by |
| 113 | apply hraw.congr' |
| 114 | filter_upwards [self_mem_nhdsWithin] with t ht |
| 115 | exact heq ht |
| 116 | exact tendsto_nhds_unique hg hfinal |
| 117 | |
| 118 | /-- An excluded endpoint at an included physical time has completed |
| 119 | coordinate on the frontier of the literal tracked source U. Source: |
| 120 | Proposition 16.13, pp. 377-378. -/ |
| 121 | theorem rawCylinder_entry_coordinate_mem_frontier |
| 122 | {a b : ℝ} (hab : a < b) |
| 123 | {gamma : ℝ → R.spacetime.Point} {xi : ℝ → C.carrier} |
| 124 | (hgamma : ContinuousOn gamma (Icc a b)) (hxi : ContinuousOn xi (Icc a b)) |
| 125 | (beta : ℝ → (R.timeIntervals.interval |
| 126 | (cylinderPhysicalInterval origin scale e.scale_pos J)).Point × U) |
| 127 | (heq : EqOn (rawCylinderMap R e ∘ beta) gamma (Ioo a b)) |
| 128 | (hcoordinate : EqOn (fun t => (beta t).2.val) xi (Ioo a b)) |
| 129 | (hclock : ∀ t ∈ Ioo a b, (beta t).1.val = R.spacetime.timeFunction (gamma t)) |
| 130 | (haclock : R.spacetime.timeFunction (gamma a) ∈ |
| 131 | (cylinderPhysicalInterval origin scale e.scale_pos J).domain) |
| 132 | (hout : gamma a ∉ range (rawCylinderMap R e)) : xi a ∈ frontier (U : Set C.carrier) := by |
| 133 | have hnot : xi a ∉ U := by |
| 134 | intro hU |
| 135 | exact hout ⟨_, (rawCylinder_completed_endpoint_eq R e hab ⟨le_rfl, hab.le⟩ |
| 136 | hgamma hxi beta heq hcoordinate hclock haclock hU).symm⟩ |
| 137 | have hmaps : MapsTo xi (Ioo a b) U := by |
| 138 | intro t ht |
| 139 | rw [← hcoordinate ht] |
| 140 | exact (beta t).2.property |
| 141 | have hcl := hmaps.closure_of_continuousOn (by |
| 142 | simpa only [closure_Ioo hab.ne] using hxi) |
| 143 | have ha : a ∈ closure (Ioo a b) := by |
| 144 | simp only [closure_Ioo hab.ne, mem_Icc] |
| 145 | exact ⟨le_rfl, hab.le⟩ |
| 146 | rw [frontier, U.isOpen.interior_eq] |
| 147 | exact ⟨hcl ha, hnot⟩ |
| 148 | |
| 149 | end PoincareMT.Proofs.M46 |