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.Assembly.CanonicalSelection |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Assembly.Conclusion |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Canonical.Cap.Assembly.SameCorePersistence |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.LimitTheory |
| 5 | |
| 6 | /-! # Completing the singular regular limit from cap persistence -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | set_option backward.isDefEq.respectTransparency false |
| 10 | |
| 11 | open Set Filter |
| 12 | open scoped Manifold ContDiff Topology |
| 13 | |
| 14 | universe u |
| 15 | |
| 16 | namespace PoincareMT |
| 17 | |
| 18 | section |
| 19 | |
| 20 | variable (P04 : RicciFlowCurvatureTheory.{u}) |
| 21 | |
| 22 | include P04 |
| 23 | |
| 24 | namespace SingularRegularLimit |
| 25 | |
| 26 | /-- A recurrent old cap yields an actual terminal cap at its retained core point. -/ |
| 27 | theorem exists_terminal_cap_of_frequently_threshold : |
| 28 | ∃ ε₀ : ℝ, 0 < ε₀ ∧ ε₀ ≤ 1 / 200 ∧ |
| 29 | ∀ {M : Type u} [TopologicalSpace M] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 31 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 32 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 33 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 34 | (H : SingularTimeAssumptions F T M), H.epsilon ≤ ε₀ → |
| 35 | ∀ x : H.regularRegion P04, 0 < (H.terminalConnection P04).scalarCurvature x → |
| 36 | (∃ᶠ t in 𝓝[<] T, ∃ ht : t ∈ Ico H.reference.tMinus T, |
| 37 | ∃ N : CapCertificate (F.metric t), N.epsilon = H.epsilon ∧ |
| 38 | N.cap_constant ≤ H.constant ∧ N.connection = F.connection t ∧ |
| 39 | H.reference.forward t ht x ∈ N.core) → |
| 40 | ∃ N : CapCertificate (H.terminalMetric P04), |
| 41 | N.epsilon = terminalAccuracyFactor * H.epsilon ∧ |
| 42 | N.cap_constant ≤ 2 * H.constant ∧ N.connection = H.terminalConnection P04 ∧ |
| 43 | x ∈ N.core := by |
| 44 | obtain ⟨εP, hεP, hsmall, hcap⟩ := exists_terminal_same_core_cap_persistence_threshold P04 |
| 45 | obtain ⟨εC, hεC, _, hcapture⟩ := exists_neck_cap_compact_capture_threshold.{u} |
| 46 | refine ⟨min εP εC, lt_min hεP hεC, (min_le_left _ _).trans hsmall, ?_⟩ |
| 47 | intro M _ _ _ _ _ _ _ _ F T H hε x hx hfrequent |
| 48 | obtain ⟨A, hA, hAreg, sA, _, hsAT, hcapture⟩ := |
| 49 | hcapture H P04 (hε.trans (min_le_right _ _)) x x.property |
| 50 | let AΩ : Set (H.regularRegion P04) := Subtype.val ⁻¹' A |
| 51 | have hAΩ : IsCompact AΩ := by |
| 52 | apply Topology.IsInducing.subtypeVal.isCompact_preimage' hA |
| 53 | intro y hy |
| 54 | exact ⟨⟨y, hAreg hy⟩, rfl⟩ |
| 55 | have hlateA : ∀ᶠ t in 𝓝[<] T, t ∈ Ioo sA T := Ioo_mem_nhdsLT hsAT |
| 56 | obtain ⟨t, ⟨ht, C, hCε, hCC, hCD, hxC⟩, hlate, hproduce⟩ := |
| 57 | (hfrequent.and_eventually (hlateA.and |
| 58 | (hcap H (hε.trans (min_le_left _ _)) hAΩ x hx))).exists |
| 59 | have hcaptured := (hcapture t ht hlate.1.le).2 C hCC hCD hxC |
| 60 | have hCA : H.reference.inverse t ht '' C.carrier ⊆ Subtype.val '' AΩ := by |
| 61 | intro y hy |
| 62 | have hyA := hcaptured (subset_closure hy) |
| 63 | exact ⟨⟨y, hAreg hyA⟩, hyA, rfl⟩ |
| 64 | exact hproduce ht C hCε hCC hCD hCA hxC |
| 65 | |
| 66 | /-- All four recurrent alternatives produce terminal canonical control. -/ |
| 67 | theorem exists_terminal_canonical_threshold : |
| 68 | ∃ ε₀ : ℝ, 0 < ε₀ ∧ ε₀ ≤ 1 / 200 ∧ |
| 69 | ∀ {M : Type u} [TopologicalSpace M] |
| 70 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 71 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 72 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 73 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 74 | (H : SingularTimeAssumptions F T M), H.epsilon ≤ ε₀ → |
| 75 | ∀ (hΩ : H.reference.regularLimitSet.Nonempty) (x : H.regularRegion P04), |
| 76 | H.r₀⁻¹ ^ 2 < (H.terminalConnection P04).scalarCurvature x → |
| 77 | TerminalCanonicalNeighborhood (H.nonemptyExtension P04 hΩ) |
| 78 | ((H.terminalSliceHomeomorph P04).symm x) |
| 79 | (terminalAccuracyFactor * H.epsilon) (2 * H.constant) := by |
| 80 | obtain ⟨εS, hεS, hsmall, hselect⟩ := exists_terminal_canonical_or_frequent_cap_threshold P04 |
| 81 | obtain ⟨εC, hεC, _, hcap⟩ := exists_terminal_cap_of_frequently_threshold P04 |
| 82 | refine ⟨min εS εC, lt_min hεS hεC, (min_le_left _ _).trans hsmall, ?_⟩ |
| 83 | intro M _ _ _ _ _ _ _ _ F T H hε hΩ x hx |
| 84 | rcases hselect H (hε.trans (min_le_left _ _)) hΩ x hx with hcanonical | hfrequent |
| 85 | · exact hcanonical |
| 86 | obtain ⟨C, hCε, hCC, hCD, hxC⟩ := hcap H (hε.trans (min_le_right _ _)) x |
| 87 | ((sq_nonneg _).trans_lt hx) hfrequent |
| 88 | obtain ⟨CT, hCTε, hCTC, hCTD, hxCT⟩ := SliceGeometry.exists_cap_of_eq |
| 89 | (H.extendedSliceGeometry_terminal P04) ((H.terminalSliceHomeomorph P04).symm x) |
| 90 | (show ∃ N : CapCertificate (H.terminalMetric P04), |
| 91 | N.epsilon = terminalAccuracyFactor * H.epsilon ∧ |
| 92 | N.cap_constant ≤ 2 * H.constant ∧ N.connection = H.terminalConnection P04 ∧ |
| 93 | H.terminalSliceHomeomorph P04 ((H.terminalSliceHomeomorph P04).symm x) ∈ N.core from |
| 94 | ⟨C, hCε, hCC, hCD, by simpa only [Homeomorph.apply_symm_apply] using hxC⟩) |
| 95 | exact GeneralizedCanonicalControl.cap CT hCTε hCTC hCTD hxCT |
| 96 | |
| 97 | end SingularRegularLimit |
| 98 | |
| 99 | /-- Construct the calibrated singular-time regular limit from the M04 theory |
| 100 | and the unchanged singular-time assumptions, relative to the supplied M25 theory. -/ |
| 101 | theorem m31SingularRegularLimit : RepairedSingularRegularLimitTheory.{u} := by |
| 102 | obtain ⟨εL, hεL, _, hlimit⟩ := |
| 103 | SingularRegularLimit.exists_limit_conclusion_of_terminal_canonical_threshold P04 |
| 104 | obtain ⟨εC, hεC, _, hcanonical⟩ := |
| 105 | SingularRegularLimit.exists_terminal_canonical_threshold P04 |
| 106 | refine ⟨?_⟩ |
| 107 | intro A |
| 108 | let ε₀ := min εL (min εC (A.epsilon₀ / terminalAccuracyFactor)) |
| 109 | have hε₀ : 0 < ε₀ := lt_min hεL |
| 110 | (lt_min hεC (div_pos A.epsilon₀_pos terminalAccuracyFactor_pos)) |
| 111 | have hε₀A : terminalAccuracyFactor * ε₀ ≤ A.epsilon₀ := by |
| 112 | have h := (min_le_right εL (min εC (A.epsilon₀ / terminalAccuracyFactor))).trans |
| 113 | (min_le_right εC (A.epsilon₀ / terminalAccuracyFactor)) |
| 114 | have hh := (le_div_iff₀ terminalAccuracyFactor_pos).mp h |
| 115 | simpa only [mul_comm] using hh |
| 116 | refine ⟨ε₀, hε₀, hε₀A, ?_⟩ |
| 117 | intro M _ _ _ _ _ _ _ _ F T H hε |
| 118 | apply hlimit A H (hε.trans (min_le_left _ _)) |
| 119 | ((mul_le_mul_of_nonneg_left hε terminalAccuracyFactor_pos.le).trans hε₀A) |
| 120 | intro hΩ x hx |
| 121 | have hx' : H.r₀⁻¹ ^ 2 < (H.terminalConnection P04).scalarCurvature |
| 122 | (H.terminalSliceHomeomorph P04 x) := by |
| 123 | rw [H.terminalSliceHomeomorph_scalar_pullback P04 x] |
| 124 | exact hx |
| 125 | have hcan := hcanonical H |
| 126 | (hε.trans ((min_le_right _ _).trans (min_le_left _ _))) hΩ |
| 127 | (H.terminalSliceHomeomorph P04 x) hx' |
| 128 | simpa only [Homeomorph.symm_apply_apply] using hcan |
| 129 | |
| 130 | end |
| 131 | |
| 132 | end PoincareMT |