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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Local.CapGeometry.LocalCapRegularCore |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.CapTopology.InnerAttachment |
| 4 | import PoincareLib.Topology.Manifold.NeckCap.Separation |
| 5 | /-! |
| 6 | # Separation by the boundary neck of a cap |
| 7 | |
| 8 | The boundary neck meets both the core interior and the end neck. These two |
| 9 | sets lie on opposite sides of the boundary sphere, so that sphere separates |
| 10 | its ambient connected component. |
| 11 | |
| 12 | Reference: Morgan--Tian, Proposition A.21 and Claims A.23--A.24, pp. 508--514. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.CapCertificate |
| 23 | |
| 24 | variable {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 26 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 27 | [T2Space M] [T3Space M] {g : RiemannianMetric 3 M} |
| 28 | (C : CapCertificate g) |
| 29 | |
| 30 | omit [T2Space M] in |
| 31 | theorem boundary_subset_closure_end_m28 : C.boundary_sphere ⊆ closure C.end_neck.carrier := by |
| 32 | rw [C.boundary_eq_end_frontier] |
| 33 | exact inter_subset_right.trans frontier_subset_closure |
| 34 | |
| 35 | omit [T2Space M] in |
| 36 | theorem boundary_neck_inter_core_nonempty_m28 : |
| 37 | (C.boundary_neck.carrier ∩ C.core).Nonempty := by |
| 38 | have hclosure : C.boundary_sphere ⊆ closure C.core := by |
| 39 | rw [← C.closed_core_eq_closure_core] |
| 40 | exact C.boundary_subset_closed_core_m28 |
| 41 | apply (mem_closure_iff.mp (hclosure |
| 42 | (C.boundary_eq_neck_sphere.symm ▸ C.boundary_neck.center_on_central_sphere))) |
| 43 | _ C.boundary_neck.carrier_open |
| 44 | exact C.boundary_neck.central_sphere_subset C.boundary_neck.center_on_central_sphere |
| 45 | |
| 46 | omit [T2Space M] in |
| 47 | theorem boundary_neck_inter_end_nonempty_m28 : |
| 48 | (C.boundary_neck.carrier ∩ C.end_neck.carrier).Nonempty := by |
| 49 | apply (mem_closure_iff.mp (C.boundary_subset_closure_end_m28 |
| 50 | (C.boundary_eq_neck_sphere.symm ▸ C.boundary_neck.center_on_central_sphere))) |
| 51 | _ C.boundary_neck.carrier_open |
| 52 | exact C.boundary_neck.central_sphere_subset C.boundary_neck.center_on_central_sphere |
| 53 | |
| 54 | /-- The separating label is derived from cap geometry in the neck's own |
| 55 | connected component, without assuming that the entire manifold is connected. -/ |
| 56 | theorem boundary_neck_isSeparating_m28 : C.boundary_neck.IsSeparating := by |
| 57 | refine ⟨C.boundary_neck.component_diff_central_sphere_nonempty, ?_⟩ |
| 58 | intro hc |
| 59 | have hin : ((connectedComponent C.boundary_neck.center \ |
| 60 | C.boundary_neck.central_sphere) ∩ C.core).Nonempty := by |
| 61 | obtain ⟨x, hx, hxin⟩ := C.boundary_neck_inter_core_nonempty_m28 |
| 62 | refine ⟨x, ⟨C.boundary_neck.carrier_subset_connectedComponent hx, ?_⟩, hxin⟩ |
| 63 | rw [← C.boundary_eq_neck_sphere] |
| 64 | exact fun hb => Set.disjoint_left.mp C.disjoint_core_boundary_m28 hxin hb |
| 65 | have hout : ((connectedComponent C.boundary_neck.center \ |
| 66 | C.boundary_neck.central_sphere) ∩ C.end_neck.carrier).Nonempty := by |
| 67 | obtain ⟨x, hx, hxend⟩ := C.boundary_neck_inter_end_nonempty_m28 |
| 68 | refine ⟨x, ⟨C.boundary_neck.carrier_subset_connectedComponent hx, ?_⟩, hxend⟩ |
| 69 | rw [← C.boundary_eq_neck_sphere] |
| 70 | exact fun hb => Set.disjoint_left.mp C.disjoint_closed_core_end_m28 |
| 71 | (C.boundary_subset_closed_core_m28 hb) hxend |
| 72 | obtain ⟨x, hx, hb⟩ := C.boundary_inter_nonempty_of_core_end_m28 hc.2 hin hout |
| 73 | exact hx.2 (C.boundary_eq_neck_sphere ▸ hb) |
| 74 | |
| 75 | end PoincareMT.CapCertificate |