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.StandardCap.PersistenceGeometry |
| 2 | import Mathlib.Analysis.SpecificLimits.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Initial cap comparisons at a uniform cutoff |
| 6 | |
| 7 | Morgan--Tian, Claim 16.6 and Corollary 16.7, pp. 371-372, and the |
| 8 | counterexample sequence on pp. 373-374. The actual M36 local result gives |
| 9 | arbitrarily accurate fixed-radius comparisons at a cutoff chosen before |
| 10 | the flow. The parameter inequalities make the surgery heights vanish. |
| 11 | Exact-ball reparametrization and smooth limit extraction are separate steps. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Filter |
| 17 | open scoped Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- A fixed finite radius and jet order are covered by one positive M36 |
| 24 | cutoff, uniformly over actual surgery events (Claim 16.6, p. 371). -/ |
| 25 | theorem exists_initial_cap_comparison_cutoff (K : MetricSurgeryConstants) |
| 26 | {A tolerance : ℝ} (hA : 0 < A) (htolerance : 0 < tolerance) (k : ℕ) : |
| 27 | ∃ eta : ℝ, 0 < eta ∧ eta < tolerance ∧ A < eta⁻¹ ∧ k ≤ ⌊eta⁻¹⌋₊ ∧ |
| 28 | ∃ deltaBar : ℝ, 0 < deltaBar ∧ |
| 29 | ∀ (F : SurgeryFlowData.{u}), F.local_constants = K → |
| 30 | ∀ (t : ℝ) (hT : t ∈ F.surgery_times) |
| 31 | [Nonempty (F.slice t).carrier], |
| 32 | F.parameters.delta t ≤ deltaBar → |
| 33 | ∀ i : Fin (F.event t hT).cap_count, |
| 34 | Nonempty (SurgeryCapClose F.standard_initial |
| 35 | ((F.event t hT).local_result i).output |
| 36 | ((F.event t hT).local_result i).metric |
| 37 | ((F.event t hT).local_result i).tip |
| 38 | (((F.event t hT).necks i).neck.scale) eta) := by |
| 39 | let eta := min (tolerance / 2) (A + (k : ℝ) + 1)⁻¹ |
| 40 | have hden : 0 < A + (k : ℝ) + 1 := by positivity |
| 41 | have heta : 0 < eta := lt_min (by positivity) (inv_pos.mpr hden) |
| 42 | have hetol : eta < tolerance := |
| 43 | (min_le_left _ _).trans_lt (by linarith) |
| 44 | have hinv : A + (k : ℝ) + 1 ≤ eta⁻¹ := by |
| 45 | have h := one_div_le_one_div_of_le heta (min_le_right _ _) |
| 46 | simpa only [one_div, inv_inv] using h |
| 47 | refine ⟨eta, heta, hetol, ?_, ?_, K.comparison_delta eta, |
| 48 | K.comparison_delta_pos eta heta, ?_⟩ |
| 49 | · linarith [Nat.cast_nonneg (α := ℝ) k] |
| 50 | · exact (Nat.le_floor_iff (inv_pos.mpr heta).le).mpr (by linarith) |
| 51 | · intro F hK t hT _ hdelta i |
| 52 | apply ((F.event t hT).local_result i).standard_close eta heta |
| 53 | rw [(F.event t hT).neck_delta i, hK] |
| 54 | exact hdelta |
| 55 | |
| 56 | /-- The physical height is bounded by delta squared times the fixed |
| 57 | epsilon, as in the counterexample sequence of Proposition 16.5, p. 374. -/ |
| 58 | theorem SurgeryParameters.height_le_delta_sq_mul_epsilon (P : SurgeryParameters) |
| 59 | {t : ℝ} (ht : 0 ≤ t) : P.h t ≤ P.delta t ^ 2 * P.epsilon := |
| 60 | (P.h_le t ht).trans |
| 61 | (mul_le_mul_of_nonneg_left (P.r_le_epsilon t ht) (sq_nonneg _)) |
| 62 | |
| 63 | /-- The surgery parameters of the counterexample sequence tend to zero |
| 64 | under the reciprocal cutoff chosen on p. 374 of Proposition 16.5. -/ |
| 65 | theorem surgery_delta_tendsto_zero |
| 66 | (F : ℕ → SurgeryFlowData.{u}) (t : ℕ → ℝ) |
| 67 | (ht : ∀ n, 0 ≤ t n) |
| 68 | (hdelta : ∀ n, (F n).parameters.delta (t n) ≤ 1 / ((n : ℝ) + 1)) : |
| 69 | Tendsto (fun n => (F n).parameters.delta (t n)) atTop (𝓝 0) := by |
| 70 | exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds |
| 71 | tendsto_one_div_add_atTop_nhds_zero_nat |
| 72 | (fun n => ((F n).parameters.delta_pos (t n) (ht n)).le) hdelta |
| 73 | |
| 74 | /-- The heights in Proposition 16.5's contradiction sequence vanish. |
| 75 | Only an upper bound on the actual radius profile is used (p. 374). -/ |
| 76 | theorem surgery_height_tendsto_zero |
| 77 | (F : ℕ → SurgeryFlowData.{u}) (t : ℕ → ℝ) {epsilon : ℝ} |
| 78 | (ht : ∀ n, 0 ≤ t n) |
| 79 | (hepsilon : ∀ n, (F n).parameters.epsilon = epsilon) |
| 80 | (hdelta : Tendsto (fun n => (F n).parameters.delta (t n)) atTop (𝓝 0)) : |
| 81 | Tendsto (fun n => (F n).parameters.h (t n)) atTop (𝓝 0) := by |
| 82 | have hupper : Tendsto (fun n => (F n).parameters.delta (t n) ^ 2 * epsilon) |
| 83 | atTop (𝓝 0) := by |
| 84 | simpa only [zero_pow (by decide : (2 : ℕ) ≠ 0), zero_mul] using |
| 85 | (hdelta.pow 2).mul_const epsilon |
| 86 | apply tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hupper |
| 87 | (fun n => ((F n).parameters.h_pos (t n) (ht n)).le) |
| 88 | intro n |
| 89 | simpa only [hepsilon n] using |
| 90 | (F n).parameters.height_le_delta_sq_mul_epsilon (ht n) |
| 91 | |
| 92 | end PoincareMT |