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.Singular.DeepHorn.Geometry.Levels |
| 2 | |
| 3 | /-! |
| 4 | # Finitely many terminal components meet the controlled core |
| 5 | |
| 6 | Connected components of the terminal manifold are open. Compact scalar |
| 7 | sublevels therefore have a finite cover by components represented by points |
| 8 | of the sublevel itself. |
| 9 | |
| 10 | This prepares the terminal operation of Morgan--Tian, Definition 15.8, |
| 11 | pp. 361-362, and Lemma 15.11, pp. 364-365. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.Surgery.Terminal |
| 23 | |
| 24 | /-- A compact set in a locally connected space meets finitely many components, |
| 25 | with representatives selected from the compact set. -/ |
| 26 | theorem exists_finset_component_representatives {X : Type u} [TopologicalSpace X] |
| 27 | [LocallyConnectedSpace X] (K : Set X) (hK : IsCompact K) : |
| 28 | ∃ R : Finset X, (R : Set X) ⊆ K ∧ |
| 29 | ∀ x ∈ K, ∃ y ∈ R, connectedComponent x = connectedComponent y := by |
| 30 | classical |
| 31 | obtain ⟨R, hR⟩ := hK.elim_finite_subcover |
| 32 | (fun y : K => connectedComponent y.val) (fun _ => isOpen_connectedComponent) |
| 33 | (fun x hx => mem_iUnion.mpr ⟨⟨x, hx⟩, mem_connectedComponent⟩) |
| 34 | refine ⟨R.image Subtype.val, ?_, ?_⟩ |
| 35 | · intro y hy |
| 36 | obtain ⟨z, hz, rfl⟩ := Finset.mem_image.mp hy |
| 37 | exact z.property |
| 38 | · intro x hx |
| 39 | obtain ⟨y, hy, hxy⟩ := mem_iUnion₂.mp (hR hx) |
| 40 | exact ⟨y.val, Finset.mem_image.mpr ⟨y, hy, rfl⟩, (connectedComponent_eq hxy).symm⟩ |
| 41 | |
| 42 | end PoincareMT.Surgery.Terminal |
| 43 | |
| 44 | namespace PoincareMT.SingularLimitConclusion |
| 45 | |
| 46 | variable {M : Type u} [TopologicalSpace M] |
| 47 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 48 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 49 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 50 | {G : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 51 | {H : SingularTimeAssumptions G T M} |
| 52 | |
| 53 | /-- Every component meeting the low-curvature core has a representative in |
| 54 | one actual finite set of low-curvature terminal points. -/ |
| 55 | theorem exists_low_curvature_component_representatives |
| 56 | (Q : SingularLimitConclusion H) (rho : ℝ) : |
| 57 | ∃ R : Finset (Q.extension.extended.slice T).carrier, |
| 58 | (∀ y ∈ R, Q.terminal_scalar y ≤ rho⁻¹ ^ 2) ∧ |
| 59 | (∀ x, Q.terminal_scalar x ≤ rho⁻¹ ^ 2 → |
| 60 | ∃ y ∈ R, connectedComponent x = connectedComponent y) := by |
| 61 | let : LocallyConnectedSpace (Q.extension.extended.slice T).carrier := |
| 62 | ChartedSpace.locallyConnectedSpace (EuclideanSpace ℝ (Fin 3)) _ |
| 63 | have hK : IsCompact {x | Q.terminal_scalar x ≤ rho⁻¹ ^ 2} := by |
| 64 | simpa only [Q.terminal_scalar_eq] using Q.isCompact_scalar_sublevel (rho⁻¹ ^ 2) |
| 65 | obtain ⟨R, hR, hcover⟩ := Surgery.Terminal.exists_finset_component_representatives _ hK |
| 66 | exact ⟨R, fun y hy => hR hy, hcover⟩ |
| 67 | |
| 68 | /-- The set of all terminal components meeting the low-curvature core is finite. -/ |
| 69 | theorem finite_low_curvature_components (Q : SingularLimitConclusion H) (rho : ℝ) : |
| 70 | {A : Set (Q.extension.extended.slice T).carrier | |
| 71 | ∃ x, Q.terminal_scalar x ≤ rho⁻¹ ^ 2 ∧ A = connectedComponent x}.Finite := by |
| 72 | obtain ⟨R, hR, hcover⟩ := Q.exists_low_curvature_component_representatives rho |
| 73 | apply ((R.finite_toSet).image connectedComponent).subset |
| 74 | rintro A ⟨x, hx, rfl⟩ |
| 75 | obtain ⟨y, hy, hxy⟩ := hcover x hx |
| 76 | exact ⟨y, hy, hxy.symm⟩ |
| 77 | |
| 78 | end PoincareMT.SingularLimitConclusion |