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.Canonical.RoundComponent.Carrier |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Canonical.RoundComponent.Perturbation |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.RegularLimit.Canonical.RoundComponent.Upgrade |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Singular.Accuracy |
| 5 | |
| 6 | /-! # The complete terminal round-component alternative -/ |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | |
| 10 | open Set Filter |
| 11 | open scoped Manifold ContDiff Bundle Topology |
| 12 | |
| 13 | universe u |
| 14 | |
| 15 | namespace PoincareMT.SingularTimeAssumptions |
| 16 | |
| 17 | open SingularRegularLimit.RoundComparison |
| 18 | |
| 19 | variable {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 21 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 22 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 23 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 24 | |
| 25 | /-- Recurrent original round components give the complete actual terminal |
| 26 | round certificate, with doubled accuracy and the exact connected carrier. -/ |
| 27 | theorem exists_terminal_roundComponent_doubled_of_frequently |
| 28 | (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) |
| 29 | (hepsilon : H.epsilon ≤ roundComparisonThreshold) (x : H.regularRegion P04) |
| 30 | (hfreq : ∃ᶠ t in 𝓝[<] T, ∃ ht : t ∈ Ico H.reference.tMinus T, |
| 31 | ∃ N : SingularRoundComponent (F.metric t) H.epsilon, |
| 32 | H.reference.forward t ht x ∈ N.carrier) |
| 33 | (hpos : 0 < (H.terminalConnection P04).scalarCurvature x) : |
| 34 | ∃ N : SingularRoundComponent (H.terminalMetric P04) (2 * H.epsilon), |
| 35 | N.carrier = connectedComponent x ∧ x ∈ N.carrier := by |
| 36 | have hε := H.epsilon_pos |
| 37 | have hcompact := H.compact_component_of_frequently_roundComponent P04 hepsilon x hfreq |
| 38 | have hm : ⌊(2 * H.epsilon)⁻¹⌋₊ ≤ ⌊H.epsilon⁻¹⌋₊ := |
| 39 | Nat.floor_mono ((inv_le_inv₀ (by positivity) H.epsilon_pos).2 (by linarith [H.epsilon_pos])) |
| 40 | have hpert := H.eventually_roundComponent_terminal_perturbation P04 hepsilon x hpos hcompact |
| 41 | ⌊(2 * H.epsilon)⁻¹⌋₊ hm (show 0 < H.epsilon ^ 2 / 2 by positivity) |
| 42 | obtain ⟨t, ⟨N, hcarrier, hx⟩, herr⟩ := |
| 43 | ((H.frequently_regularRoundComponent P04 hepsilon x hfreq).and_eventually hpert).exists |
| 44 | let NT := N.changeMetric (H.terminalMetric P04) (herr N hx (hcarrier ▸ subset_rfl)) |
| 45 | exact ⟨NT, hcarrier, hx⟩ |
| 46 | |
| 47 | /-- The same terminal component with the revised, weaker comparison accuracy. -/ |
| 48 | theorem exists_terminal_roundComponent_of_frequently |
| 49 | (H : SingularTimeAssumptions F T M) (P04 : RicciFlowCurvatureTheory.{u}) |
| 50 | (hepsilon : H.epsilon ≤ roundComparisonThreshold) (x : H.regularRegion P04) |
| 51 | (hfreq : ∃ᶠ t in 𝓝[<] T, ∃ ht : t ∈ Ico H.reference.tMinus T, |
| 52 | ∃ N : SingularRoundComponent (F.metric t) H.epsilon, |
| 53 | H.reference.forward t ht x ∈ N.carrier) |
| 54 | (hpos : 0 < (H.terminalConnection P04).scalarCurvature x) : |
| 55 | ∃ N : SingularRoundComponent (H.terminalMetric P04) |
| 56 | (terminalAccuracyFactor * H.epsilon), |
| 57 | N.carrier = connectedComponent x ∧ x ∈ N.carrier := by |
| 58 | obtain ⟨N, hcarrier, hx⟩ := |
| 59 | H.exists_terminal_roundComponent_doubled_of_frequently P04 hepsilon x hfreq hpos |
| 60 | exact ⟨N.restrictAccuracy |
| 61 | (mul_le_mul_of_nonneg_right two_le_terminalAccuracyFactor H.epsilon_pos.le), hcarrier, hx⟩ |
| 62 | |
| 63 | end PoincareMT.SingularTimeAssumptions |