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.Existence.Lifetime.CanonicalGeometry.CapPersistenceTransferTolerance |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Lifetime.Curvature.CapPersistenceNeckScalar |
| 3 | |
| 4 | /-! |
| 5 | # One cap accuracy before the classified geometry |
| 6 | |
| 7 | The final ordinary jet and scalar tolerances determine the old accuracy |
| 8 | before any cap, classification constant, carrier or convergence. The |
| 9 | same choice retains the strong-neck spatial margin. Source: Morgan--Tian |
| 10 | Proposition 9.79(3), p. 234, and Theorem 12.28, pp. 323-324; |
| 11 | cap-persistence-implementation.md, sections 3 and 6. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M34 |
| 22 | |
| 23 | local notation "E₂" => EuclideanSpace ℝ (Fin 2) |
| 24 | local notation "E₃" => EuclideanSpace ℝ (Fin 3) |
| 25 | |
| 26 | /-- One positive accuracy supplies the extra derivative, half the |
| 27 | ordinary error tolerance and the actual scalar comparison on the entire |
| 28 | old-neck closure, before every manifold and neck. -/ |
| 29 | theorem capPersistence_exists_common_neck_accuracy (epsilon tau eta : ℝ) |
| 30 | (hepsilon : 0 < epsilon) (htau : 0 < tau) (heta : 0 < eta) : |
| 31 | ∃ delta0 : ℝ, 0 < delta0 ∧ delta0 ≤ epsilon / 4 ∧ |
| 32 | ∀ (M : Type u) [TopologicalSpace M] [ChartedSpace E₃ M] |
| 33 | [IsManifold (𝓡 3) ∞ M] [T2Space M] |
| 34 | (g : RiemannianMetric 3 M) (N : EpsilonNeck g), N.epsilon < delta0 → |
| 35 | Nat.floor epsilon⁻¹ + 1 ≤ Nat.floor N.epsilon⁻¹ ∧ |
| 36 | (∀ (q : UnitTwoSphere) (s : ℝ), s ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ → |
| 37 | ∀ j ≤ Nat.floor epsilon⁻¹, ∀ a b : Fin 3, |
| 38 | ‖iteratedFDeriv ℝ j (fun y => |
| 39 | roundCylinderTensorCoefficient (fun z v w => N.scale⁻¹ ^ 2 * |
| 40 | roundCylinderPullback g N.coordinate_map z v w) (chartAt E₂ q) y a b - |
| 41 | roundCylinderGram 0 (chartAt E₂ q) y a b) (0, s)‖ ≤ tau / 2) ∧ |
| 42 | (∀ x ∈ closure N.carrier, |
| 43 | |N.scale ^ 2 * N.connection.scalarCurvature x - 1| ≤ min (eta / 2) (1 / 10)) := by |
| 44 | obtain ⟨d1, hd1, _hd1epsilon, herror⟩ := |
| 45 | capPersistence_exists_old_transfer_accuracy epsilon tau hepsilon htau |
| 46 | have hsmall : 0 < min (eta / 2) (1 / 10 : ℝ) := |
| 47 | lt_min (div_pos heta (by norm_num)) (by norm_num) |
| 48 | obtain ⟨d2, hd2, hscalar⟩ := capPersistence_exists_neck_scalar_accuracy hsmall |
| 49 | let delta0 := min d1 (min d2 (epsilon / 4)) |
| 50 | have hdelta0 : 0 < delta0 := |
| 51 | lt_min hd1 (lt_min hd2 (div_pos hepsilon (by norm_num))) |
| 52 | refine ⟨delta0, hdelta0, (min_le_right _ _).trans (min_le_right _ _), ?_⟩ |
| 53 | intro M _ _ _ _ g N hN |
| 54 | have hN1 : N.epsilon < d1 := hN.trans_le (min_le_left _ _) |
| 55 | have hN2 : N.epsilon < d2 := |
| 56 | hN.trans_le ((min_le_right _ _).trans (min_le_left _ _)) |
| 57 | obtain ⟨hm, hjets⟩ := herror N.epsilon N.epsilon_pos hN1 |
| 58 | exact ⟨hm, hjets _ N.metric_comparison.close, (hscalar M g N hN2).2⟩ |
| 59 | |
| 60 | end PoincareMT.M34 |