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.RegularLimit.Empty |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Spacetime.Gluing |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Ends.Horn.Construction |
| 4 | |
| 5 | /-! |
| 6 | # Assembling the linked singular regular-limit conclusion |
| 7 | |
| 8 | All geometric fields come from the constructed terminal metric and spacetime. |
| 9 | This internal assembly accepts terminal canonical control, the final geometric |
| 10 | input to the four-alternative limit argument. It retains the full frozen record |
| 11 | and treats the empty regular set explicitly. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.SingularRegularLimit |
| 23 | |
| 24 | /-- Once canonical persistence is supplied on the actual constructed |
| 25 | extension, the checked geometry yields every field of the frozen conclusion. -/ |
| 26 | theorem exists_limit_conclusion_of_terminal_canonical_threshold |
| 27 | (P04 : RicciFlowCurvatureTheory.{u}) : |
| 28 | ∃ ε₀ : ℝ, 0 < ε₀ ∧ ε₀ ≤ 1 / 200 ∧ |
| 29 | ∀ (A : RepairedNeckCapTopologyTheory.{u}) |
| 30 | {M : Type u} [TopologicalSpace M] |
| 31 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 32 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 33 | [SecondCountableTopology M] {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 34 | (H : SingularTimeAssumptions F T M), H.epsilon ≤ ε₀ → |
| 35 | terminalAccuracyFactor * H.epsilon ≤ A.epsilon₀ → |
| 36 | (∀ hΩ : H.reference.regularLimitSet.Nonempty, |
| 37 | ∀ x : ((H.nonemptyExtension P04 hΩ).extended.slice T).carrier, |
| 38 | H.r₀⁻¹ ^ 2 < ((H.nonemptyExtension P04 hΩ).extended.connection T).scalarCurvature x → |
| 39 | TerminalCanonicalNeighborhood (H.nonemptyExtension P04 hΩ) x |
| 40 | (terminalAccuracyFactor * H.epsilon) (2 * H.constant)) → |
| 41 | Nonempty (RepairedSingularRegularLimitData H) := by |
| 42 | obtain ⟨εH, hεH, hsmall, hhorn⟩ := TerminalEnd.exists_strongHorn_threshold.{u} |
| 43 | have hfactor := terminalAccuracyFactor_pos |
| 44 | have htwo := two_le_terminalAccuracyFactor |
| 45 | refine ⟨εH / terminalAccuracyFactor, div_pos hεH hfactor, ?_, ?_⟩ |
| 46 | · apply le_trans _ hsmall |
| 47 | exact (div_le_iff₀ hfactor).2 (by nlinarith) |
| 48 | intro A M _ _ _ _ _ _ _ _ F T H hε hA hcanonical |
| 49 | classical |
| 50 | by_cases hΩ : H.reference.regularLimitSet.Nonempty |
| 51 | · let E := H.nonemptyExtension P04 hΩ |
| 52 | have hcanonical' : ∀ x : (E.extended.slice T).carrier, |
| 53 | H.r₀⁻¹ ^ 2 < (E.extended.connection T).scalarCurvature x → |
| 54 | GeneralizedCanonicalControl (F := E.extended) T x |
| 55 | (terminalAccuracyFactor * H.epsilon) (2 * H.constant) := hcanonical hΩ |
| 56 | obtain ⟨hlower, hproper⟩ := H.extended_terminal_scalar_proper_and_bounded_below P04 |
| 57 | refine ⟨{ |
| 58 | regular_open := H.regularLimitSet_isOpen P04 |
| 59 | regular_eventually_bounded := H.regularLimitSet_eventually_bounded P04 |
| 60 | extension := E |
| 61 | terminal_source := H.terminalSource P04 |
| 62 | terminal_source_image := H.terminalSource_image P04 |
| 63 | terminal_source_openEmbedding := H.terminalSource_openEmbedding P04 |
| 64 | terminal_source_smooth := H.terminalSource_smooth P04 |
| 65 | terminal_source_regular := H.terminalSource_regular P04 |
| 66 | terminal_time_iff := H.terminal_mem_extendedTimeInterval_iff P04 |
| 67 | terminal_metric := E.extended.metric T |
| 68 | terminal_metric_eq := rfl |
| 69 | terminal_scalar := (E.extended.connection T).scalarCurvature |
| 70 | terminal_scalar_eq := rfl |
| 71 | scalar_lower := hlower |
| 72 | scalar_proper := hproper |
| 73 | metric_limit_on_compacts := H.compactSingularMetricLimit_extended_terminal P04 |
| 74 | gluing_map := H.terminalGluingMap P04 |
| 75 | gluing_time := H.terminalGluingMap_time P04 |
| 76 | gluing_old := H.terminalGluingMap_old P04 |
| 77 | gluing_terminal := H.terminalGluingMap_terminal P04 |
| 78 | gluing_openEmbedding := H.terminalGluingMap_openEmbedding P04 |
| 79 | gluing_cover := H.terminalGluingMap_cover P04 |
| 80 | gluing_vertical_compatibility := H.terminalGluingMap_vertical_compatibility P04 hΩ |
| 81 | component_paths := fun x => ⟨terminalComponentPath E x, rfl⟩ |
| 82 | end_tube := fun K e => hhorn E K e A |
| 83 | (mul_pos hfactor H.epsilon_pos) (mul_pos (by norm_num) H.constant_pos) |
| 84 | (by nlinarith [(le_div_iff₀ hfactor).1 hε]) hA hlower hproper hcanonical' |
| 85 | canonical_neighborhood := hcanonical' |
| 86 | }⟩ |
| 87 | · exact ⟨H.regularLimitOfEmpty (Set.not_nonempty_iff_eq_empty.mp hΩ)⟩ |
| 88 | |
| 89 | end PoincareMT.SingularRegularLimit |