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.Manifold.SmoothDomain.Interior |
| 2 | import PoincareLib.Geometry.Manifold.Interior.Connected |
| 3 | |
| 4 | /-! |
| 5 | # Smooth domains from compact embedded manifolds |
| 6 | |
| 7 | The intrinsic interior of a connected compact embedded manifold with boundary |
| 8 | is a connected relatively compact open domain. Noncompactness of the connected |
| 9 | ambient manifold ensures that this domain has nonempty boundary. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff |
| 16 | |
| 17 | namespace Poincare.Manifold |
| 18 | |
| 19 | theorem nonempty_smoothDomain_interior |
| 20 | {n : ℕ} {M : Type*} [TopologicalSpace M] [T2Space M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin (n + 1))) M] |
| 22 | [IsManifold (𝓡 (n + 1)) ∞ M] [PreconnectedSpace M] [NoncompactSpace M] |
| 23 | {K : Set M} [ChartedSpace (EuclideanHalfSpace (n + 1)) K] |
| 24 | [IsManifold (𝓡∂ (n + 1)) ∞ K] |
| 25 | (hK : IsCompact K) (hconn : IsConnected K) |
| 26 | (hemb : _root_.Manifold.IsSmoothEmbedding (𝓡∂ (n + 1)) (𝓡 (n + 1)) ∞ |
| 27 | (Subtype.val : K → M)) : Nonempty (SmoothDomain (n + 1) (interior K)) := by |
| 28 | let : ConnectedSpace K := isConnected_iff_connectedSpace.mp hconn |
| 29 | have himage := image_interior_of_isSmoothEmbedding hemb |
| 30 | have hcl : closure (interior K) = K := by |
| 31 | rw [← himage, hK.isClosed.isClosedEmbedding_subtypeVal.closure_image_eq, |
| 32 | (dense_manifoldInterior (I := 𝓡∂ (n + 1)) (M := K)).closure_eq, |
| 33 | image_univ, Subtype.range_val] |
| 34 | have hi : IsConnected (interior K) := by |
| 35 | rw [← himage] |
| 36 | exact (isPathConnected_manifoldInterior (I := 𝓡∂ (n + 1)) (M := K)).isConnected.image |
| 37 | _ continuous_subtype_val.continuousOn |
| 38 | have hb : ((𝓡∂ (n + 1)).boundary K).Nonempty := by |
| 39 | by_contra h |
| 40 | have hinner : (𝓡∂ (n + 1)).interior K = univ := by |
| 41 | rw [← compl_empty_iff, ModelWithCorners.compl_interior] |
| 42 | exact not_nonempty_iff_eq_empty.mp h |
| 43 | have hiK : interior K = K := by |
| 44 | simpa only [hinner, image_univ, Subtype.range_val] using himage.symm |
| 45 | have hopen : IsOpen K := hiK ▸ isOpen_interior |
| 46 | have hKu : K = univ := (show IsClopen K from ⟨hK.isClosed, hopen⟩).eq_univ hconn.nonempty |
| 47 | exact (not_compactSpace_iff.mpr ‹NoncompactSpace M›) (isCompact_univ_iff.mp (hKu ▸ hK)) |
| 48 | have ho : IsOpen (interior K) := isOpen_interior |
| 49 | generalize hΩ : interior K = Ω at * |
| 50 | cases hcl |
| 51 | exact ⟨⟨ho, hi, hK, inferInstance, inferInstance, hemb, himage, hb⟩⟩ |
| 52 | |
| 53 | end Poincare.Manifold |