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.Geometry.SeparatingLimitCover |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.Cylinders.CylinderUniformScalar |
| 4 | import Mathlib.Topology.Connected.Clopen |
| 5 | |
| 6 | /-! |
| 7 | # A selected separating neck wholly inside the positive cover set |
| 8 | |
| 9 | Scalar is bounded on the compact initial frontier and unbounded in the |
| 10 | cover set. An actual M25 chain neck with high center scalar misses that |
| 11 | frontier. Connectedness places its whole carrier in the cover set; its |
| 12 | source provenance gives separation. Source: Morgan--Tian Claim 10.8, |
| 13 | p. 254 and corrected Appendix A.19; M28 derivation 94. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M28 |
| 24 | |
| 25 | /-- Arbitrarily high scalar occurs at selected separating chain necks |
| 26 | whose whole carriers lie in the actual open cover set. The threshold |
| 27 | precedes all geometric objects. Source: Claim 10.8; derivation 94. -/ |
| 28 | theorem exists_high_selected_neck_inside_accuracy : |
| 29 | ∃ epsilon0 : ℝ, 0 < epsilon0 ∧ epsilon0 ≤ (1 / 200 : ℝ) ∧ |
| 30 | ∀ (M : Type u) [TopologicalSpace M] |
| 31 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 32 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 33 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) |
| 34 | (K : NeckOnlyCover g) (T : CorrectedA19Conclusion g K), |
| 35 | K.epsilon ≤ epsilon0 → IsOpen K.X → IsCompact (frontier K.X) → |
| 36 | (∀ B : ℝ, ∃ x ∈ K.X, B < D.scalarCurvature x) → |
| 37 | ∀ B : ℝ, ∃ i ∈ T.tube.chain.shape.active, |
| 38 | B < D.scalarCurvature (T.tube.chain.neck i).center ∧ |
| 39 | (T.tube.chain.neck i).carrier ⊆ K.X ∧ (T.tube.chain.neck i).IsSeparating := by |
| 40 | obtain ⟨epsilon0, hpos, hsmall, hratio⟩ := tube.exists_cylinder_scalar_ratio_accuracy.{u} |
| 41 | refine ⟨epsilon0, hpos, hsmall, ?_⟩ |
| 42 | intro M _ _ _ _ _ instT3 g D K T hepsilon hX hfront hunbounded B |
| 43 | let : T2Space M := @T25Space.t2Space M _ (@T3Space.t25Space M _ instT3) |
| 44 | obtain ⟨B0, hB0⟩ := hfront.bddAbove_image D.continuous_scalarCurvature.continuousOn |
| 45 | obtain ⟨x, hx, hRx⟩ := hunbounded (2 * max B (2 * B0)) |
| 46 | have hxT := T.contains_X hx |
| 47 | rw [T.tube.carrier_eq_chain_union] at hxT |
| 48 | obtain ⟨i, hi⟩ := mem_iUnion.mp hxT |
| 49 | let N := T.tube.chain.neck i.val |
| 50 | have hepsN : N.epsilon ≤ epsilon0 := by |
| 51 | rw [T.tube.chain.epsilon_eq i.val i.property, T.epsilon_eq] |
| 52 | exact hepsilon |
| 53 | have hcenter : N.center ∈ N.carrier := N.central_sphere_subset N.center_on_central_sphere |
| 54 | have hcompare := hratio M g D N hepsN x hi N.center hcenter |
| 55 | have hhigh : max B (2 * B0) < D.scalarCurvature N.center := by linarith |
| 56 | have hdisj : Disjoint N.carrier (frontier K.X) := by |
| 57 | apply Set.disjoint_left.mpr |
| 58 | intro y hy hyfront |
| 59 | have hupper := hB0 (mem_image_of_mem D.scalarCurvature hyfront) |
| 60 | have hlower := hratio M g D N hepsN N.center hcenter y hy |
| 61 | have hbound := (le_max_right B (2 * B0)).trans_lt hhigh |
| 62 | linarith |
| 63 | have hsubset : N.carrier ⊆ K.X := by |
| 64 | let : ConnectedSpace N.carrier := Subtype.connectedSpace N.isConnected_carrier |
| 65 | have hclopen : IsClopen ((Subtype.val : N.carrier → M) ⁻¹' K.X) := |
| 66 | isClopen_preimage_val hX hdisj.symm |
| 67 | have hfull := hclopen.eq_univ |
| 68 | ⟨⟨N.center, hcenter⟩, T.selected_centers_mem i.val i.property⟩ |
| 69 | intro y hy |
| 70 | have hh : (⟨y, hy⟩ : N.carrier) ∈ (univ : Set N.carrier) := mem_univ _ |
| 71 | rw [← hfull] at hh |
| 72 | exact hh |
| 73 | obtain ⟨N0, hN0, hrev⟩ := T.tube.chain.selected i.val i.property |
| 74 | have hsep := T.separating_necks N0 (T.source_subset hN0) |
| 75 | have hsepN : N.IsSeparating := by |
| 76 | unfold EpsilonNeck.IsSeparating |
| 77 | rw [hrev.2.2.1, hrev.2.2.2.2.1] |
| 78 | exact hsep |
| 79 | exact ⟨i.val, i.property, (le_max_left _ _).trans_lt hhigh, hsubset, hsepN⟩ |
| 80 | |
| 81 | end PoincareMT.M28 |