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.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.CarrierTopology |
| 3 | |
| 4 | /-! |
| 5 | # The full cap end under the selected spatial map |
| 6 | |
| 7 | Morgan-Tian Definition 9.72 in Theorem 12.28, pp. 323-324. |
| 8 | The relative end frontier and its negative axial attachment are retained |
| 9 | by the actual spatial partial diffeomorphism on the cap closure. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.CapCertificate |
| 20 | |
| 21 | /-- Definition 9.72: the original full end retains both boundary |
| 22 | attachments under the actual spatial map on the whole cap closure. -/ |
| 23 | theorem transported_end_attachment |
| 24 | {M N : Type u} [TopologicalSpace M] [TopologicalSpace N] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) N] |
| 27 | [IsManifold (𝓡 3) ∞ M] [IsManifold (𝓡 3) ∞ N] |
| 28 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 29 | {g : RiemannianMetric 3 M} (C : CapCertificate g) |
| 30 | (phi : PartialDiffeomorph (𝓡 3) (𝓡 3) M N ∞) |
| 31 | (hClosure : closure C.carrier ⊆ phi.source) : |
| 32 | phi '' C.boundary_sphere = phi '' C.carrier ∩ frontier (phi '' C.end_neck.carrier) ∧ |
| 33 | phi '' C.boundary_sphere ⊆ |
| 34 | closure (phi '' C.end_neck.region (-C.epsilon⁻¹) (-C.epsilon⁻¹ / 2)) := by |
| 35 | have hU : C.carrier ⊆ phi.source := subset_closure.trans hClosure |
| 36 | have hrelation : phi.toOpenPartialHomeomorph.IsImage C.end_neck.carrier |
| 37 | (phi '' C.end_neck.carrier) := by |
| 38 | intro x hx |
| 39 | constructor |
| 40 | · rintro ⟨z, hz, heq⟩ |
| 41 | exact phi.toPartialEquiv.injOn (hU (C.end_neck_subset hz)) hx heq ▸ hz |
| 42 | · intro hz |
| 43 | exact mem_image_of_mem phi hz |
| 44 | constructor |
| 45 | · ext p |
| 46 | constructor |
| 47 | · rintro ⟨x, hx, rfl⟩ |
| 48 | have hx' := C.boundary_eq_end_frontier ▸ hx |
| 49 | exact ⟨⟨x, hx'.1, rfl⟩, (hrelation.frontier (hU hx'.1)).mpr hx'.2⟩ |
| 50 | · rintro ⟨⟨x, hx, rfl⟩, hfrontier⟩ |
| 51 | refine ⟨x, ?_, rfl⟩ |
| 52 | rw [C.boundary_eq_end_frontier] |
| 53 | exact ⟨hx, (hrelation.frontier (hU hx)).mp hfrontier⟩ |
| 54 | · have hregion : C.end_neck.region (-C.epsilon⁻¹) (-C.epsilon⁻¹ / 2) ⊆ C.carrier := |
| 55 | fun _ hz => C.end_neck_subset hz.1 |
| 56 | have hcontinuous : ContinuousOn phi |
| 57 | (closure (C.end_neck.region (-C.epsilon⁻¹) (-C.epsilon⁻¹ / 2))) := |
| 58 | phi.contMDiffOn_toFun.continuousOn.mono ((closure_mono hregion).trans hClosure) |
| 59 | exact (image_mono C.boundary_subset_negative_end_closure).trans hcontinuous.image_closure |
| 60 | |
| 61 | end PoincareMT.CapCertificate |