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.NeckCap.Cylinder.Sphere |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Ancestry.Transport.Mathlib.SmoothEmbeddingTransport |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Ancestry.Transport.Comparison.RegionInverses |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Ancestry.Transport.Comparison.FreeSphereNullHomotopy |
| 5 | import PoincareLib.Topology.Manifold.EmbeddedSphere.Theory |
| 6 | |
| 7 | /-! |
| 8 | # The guarded surgery sphere in its actual parent |
| 9 | |
| 10 | For Morgan--Tian Proposition 15.12 and Remark 15.13 (p. 365), move the |
| 11 | actual central neck sphere through the limit inverse and the selected |
| 12 | component inverse. A nonempty intersection places the whole connected |
| 13 | sphere in the parent. The supplied M02 and M53 services then prove separation. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | /-- A connected sphere meeting a selected component lies entirely in that |
| 26 | component, the guarded-parent step in Proposition 15.12, p. 365. -/ |
| 27 | theorem m57Sphere_range_subset_component |
| 28 | {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) |
| 29 | (f : UnitTwoSphere → A.carrier) (hf : Continuous f) |
| 30 | (hne : (C.inclusion ⁻¹' range f).Nonempty) : |
| 31 | range f ⊆ range C.inclusion := by |
| 32 | let : PathConnectedSpace UnitTwoSphere := |
| 33 | isPathConnected_iff_pathConnectedSpace.mp (isPathConnected_sphere |
| 34 | (Module.one_lt_rank_of_one_lt_finrank (by simp)) |
| 35 | (0 : EuclideanSpace ℝ (Fin 3)) zero_le_one) |
| 36 | obtain ⟨x, hx⟩ := hne |
| 37 | have hxC : C.inclusion x ∈ connectedComponent (C.inclusion C.basepoint) := |
| 38 | C.range_eq_component ▸ (show C.inclusion x ∈ range C.inclusion from ⟨x, rfl⟩) |
| 39 | rw [C.range_eq_component, connectedComponent_eq hxC] |
| 40 | exact (isConnected_range hf).subset_connectedComponent hx |
| 41 | |
| 42 | /-- The sphere's image after the component inverse is the exact guarded |
| 43 | preimage set in the repaired comparison input of Proposition 15.12, p. 365. -/ |
| 44 | theorem m57ComponentSphere_range |
| 45 | {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) |
| 46 | (f : UnitTwoSphere → A.carrier) (hf : range f ⊆ range C.inclusion) : |
| 47 | range (C.inverse ∘ f) = C.inclusion ⁻¹' range f := by |
| 48 | ext x |
| 49 | constructor |
| 50 | · rintro ⟨p, rfl⟩ |
| 51 | exact ⟨p, (m57Component_inverse_right C (hf ⟨p, rfl⟩)).symm⟩ |
| 52 | · rintro ⟨p, hp⟩ |
| 53 | exact ⟨p, (congrArg C.inverse hp).trans (C.left_inverse x)⟩ |
| 54 | |
| 55 | /-- A smooth sphere meeting a simply connected compact selected parent |
| 56 | separates that parent, by the supplied M02 and M53 services (p. 365 and |
| 57 | the class-transport discussion on pp. 430-431). -/ |
| 58 | theorem m57ComponentSphere_separating |
| 59 | (P02 : RepairedClosedTopologyProvider.{u}) (G53 : RepairedSphereSeparationTheory.{u}) |
| 60 | {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) |
| 61 | [SimplyConnectedSpace C.carrier.carrier] |
| 62 | (f : UnitTwoSphere → A.carrier) |
| 63 | (hf : Manifold.IsSmoothEmbedding (𝓡 2) (𝓡 3) ∞ f) |
| 64 | (hne : (C.inclusion ⁻¹' range f).Nonempty) : |
| 65 | SeparatingSphere (C.inclusion ⁻¹' range f) := by |
| 66 | have hsub := m57Sphere_range_subset_component C f hf.contMDiff.continuous hne |
| 67 | have hinj : Function.Injective (C.inverse ∘ f) := by |
| 68 | intro x y hxy |
| 69 | apply hf.isEmbedding.injective |
| 70 | exact (m57Component_inverse_right C (hsub ⟨x, rfl⟩)).symm.trans |
| 71 | ((congrArg C.inclusion hxy).trans (m57Component_inverse_right C (hsub ⟨y, rfl⟩))) |
| 72 | have hemb := hf.comp_localDiffeomorph_along |
| 73 | (fun x => m57ComponentInverse_localDiffeomorph C (f x) (hsub ⟨x, rfl⟩)) hinj |
| 74 | let : CompactSpace C.carrier.carrier := ⟨C.compact⟩ |
| 75 | let : ConnectedSpace C.carrier.carrier := connectedSpace_iff_univ.mpr C.connected |
| 76 | let S : SmoothEmbeddedNullHomotopicSphere (M := C.carrier.carrier) := |
| 77 | { sphere := C.inverse ∘ f |
| 78 | smooth_embedding := hemb |
| 79 | null_homotopic := m57FreeSphereNullHomotopy P02 _ hemb.contMDiff.continuous } |
| 80 | obtain ⟨G⟩ := G53.separation (M := C.carrier.carrier) |
| 81 | have h := G.separating S |
| 82 | change SeparatingSphere (range (C.inverse ∘ f)) at h |
| 83 | rwa [m57ComponentSphere_range C f hsub] at h |
| 84 | |
| 85 | /-- Every actual event neck sphere that meets the selected parent separates |
| 86 | it. Both region inverses are used on their valid domains (Proposition 15.12 |
| 87 | and Remark 15.13, p. 365). -/ |
| 88 | theorem m57NeckSphere_separating |
| 89 | (P02 : RepairedClosedTopologyProvider.{u}) (G53 : RepairedSphereSeparationTheory.{u}) |
| 90 | {g₀ : StandardInitialMetric} (D : RepairedSurgeryFlowData.{u} g₀) |
| 91 | (T : ℝ) (hT : T ∈ D.flow.surgery_times) [Nonempty (D.flow.slice T).carrier] |
| 92 | (parent : SurgerySelectedComponent (D.flow.slice (D.flow.event T hT).tMinus)) |
| 93 | [SimplyConnectedSpace parent.carrier.carrier] |
| 94 | (i : Fin (D.flow.event T hT).cap_count) |
| 95 | (hne : (parent.inclusion ⁻¹' ((D.flow.event T hT).limit_identify.inverse '' |
| 96 | ((D.flow.event T hT).necks i).neck.central_sphere)).Nonempty) : |
| 97 | SeparatingSphere (parent.inclusion ⁻¹' ((D.flow.event T hT).limit_identify.inverse '' |
| 98 | ((D.flow.event T hT).necks i).neck.central_sphere)) := by |
| 99 | let E := D.flow.event T hT |
| 100 | let N := (E.necks i).neck |
| 101 | let q : UnitTwoSphere → E.terminal.carrier := fun p => N.coordinate_map (p, 0) |
| 102 | have hi : Function.Injective E.limit_identify.inverse := by |
| 103 | intro x y hxy |
| 104 | exact (E.limit_identify.right_inverse (mem_univ x)).symm.trans |
| 105 | ((congrArg E.limit_identify.map hxy).trans (E.limit_identify.right_inverse (mem_univ y))) |
| 106 | have hemb : Manifold.IsSmoothEmbedding (𝓡 2) (𝓡 3) ∞ |
| 107 | (E.limit_identify.inverse ∘ q) := |
| 108 | N.centralSphere_isSmoothEmbedding.comp_localDiffeomorph_along |
| 109 | (fun x => m57RegionInverse_localDiffeomorph E.limit_identify |
| 110 | E.regular_limit_open isOpen_univ (q x) (mem_univ _)) |
| 111 | (hi.comp N.centralSphere_isSmoothEmbedding.isEmbedding.injective) |
| 112 | have hrange : range (E.limit_identify.inverse ∘ q) = |
| 113 | E.limit_identify.inverse '' N.central_sphere := by |
| 114 | rw [range_comp, N.centralSphere_range] |
| 115 | rw [← hrange] at hne ⊢ |
| 116 | exact m57ComponentSphere_separating P02 G53 parent _ hemb hne |
| 117 | |
| 118 | end PoincareMT |