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.Continuation.Construction.Terminal.Ends.CanonicalCover |
| 2 | |
| 3 | /-! |
| 4 | # The scalar level used to cut terminal ends |
| 5 | |
| 6 | For a component meeting the rho core, the level `2 * C^2 * rho^-2` lies |
| 7 | strictly above both the core level and the canonical-neighborhood threshold. |
| 8 | Every end has a closed noncompact region above this level which attains the |
| 9 | level and has an actual terminal neck-and-cap cover. |
| 10 | |
| 11 | Source: Morgan--Tian, Lemma 11.30, pp. 284-286. |
| 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.SingularLimitConclusion |
| 23 | |
| 24 | variable {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 26 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 27 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 28 | {G : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 29 | {H : SingularTimeAssumptions G T M} |
| 30 | |
| 31 | theorem exists_calibrated_end_region (Q : SingularLimitConclusion H) |
| 32 | (K : TerminalComponentPath Q.extension) (e : TerminalEnd K) |
| 33 | (rho : ℝ) (hrho : 0 < rho) (hrho_r₀ : rho < H.r₀) |
| 34 | (hconstant : 1 ≤ H.constant) |
| 35 | (hcore : ∃ x ∈ K.component, Q.terminal_scalar x ≤ rho⁻¹ ^ 2) : |
| 36 | ∃ (n : ℕ) (X : Set (Q.extension.extended.slice T).carrier), |
| 37 | IsClosed X ∧ IsConnected X ∧ X ⊆ K.component ∧ |
| 38 | Subtype.val '' e.tail n ⊆ X ∧ ¬ IsCompact X ∧ |
| 39 | (∀ x ∈ X, 2 * H.constant ^ 2 * rho⁻¹ ^ 2 ≤ Q.terminal_scalar x) ∧ |
| 40 | (∀ x ∈ X, H.r₀⁻¹ ^ 2 < Q.terminal_scalar x) ∧ |
| 41 | ∃ x ∈ X, Q.terminal_scalar x = 2 * H.constant ^ 2 * rho⁻¹ ^ 2 := by |
| 42 | have hrho_sq : 0 < rho⁻¹ ^ 2 := sq_pos_of_pos (inv_pos.mpr hrho) |
| 43 | have hC_sq : 1 ≤ H.constant ^ 2 := by |
| 44 | nlinarith [sq_nonneg (H.constant - 1)] |
| 45 | have hlevel : rho⁻¹ ^ 2 < 2 * H.constant ^ 2 * rho⁻¹ ^ 2 := by |
| 46 | nlinarith [mul_le_mul_of_nonneg_right hC_sq hrho_sq.le] |
| 47 | have hr₀_sq : H.r₀⁻¹ ^ 2 ≤ rho⁻¹ ^ 2 := by |
| 48 | exact pow_le_pow_left₀ (inv_nonneg.mpr H.r₀_pos.le) |
| 49 | ((inv_le_inv₀ H.r₀_pos hrho).mpr hrho_r₀.le) 2 |
| 50 | obtain ⟨n, X, hclosed, hconn, hsub, htail, hnoncompact, hlower, hattain⟩ := |
| 51 | Q.exists_end_superlevel_region K e (2 * H.constant ^ 2 * rho⁻¹ ^ 2) |
| 52 | (by obtain ⟨x, hx, hcurv⟩ := hcore; exact ⟨x, hx, hcurv.trans_lt hlevel⟩) |
| 53 | exact ⟨n, X, hclosed, hconn, hsub, htail, hnoncompact, hlower, |
| 54 | fun x hx => hr₀_sq.trans_lt (hlevel.trans_le (hlower x hx)), hattain⟩ |
| 55 | |
| 56 | end PoincareMT.SingularLimitConclusion |