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.Geometry.CanonicalGeometry.CapNeckNormalization |
| 2 | |
| 3 | /-! |
| 4 | # Accuracy choices before the canonical cap classification constant |
| 5 | |
| 6 | The final accuracy fixes every old-neck threshold before the manifold, |
| 7 | cap and M27 classification constant. This preserves the quantifier order |
| 8 | in the bad-point contradiction. Source: Morgan--Tian Proposition 9.79(3), |
| 9 | p. 234, and Theorem 12.28, pp. 323-324; |
| 10 | cap-persistence-implementation.md, section 3. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff |
| 17 | |
| 18 | namespace PoincareMT.M34 |
| 19 | |
| 20 | local notation "E₂" => EuclideanSpace ℝ (Fin 2) |
| 21 | |
| 22 | /-- Before any old tensor, one positive accuracy threshold makes its |
| 23 | ordinary error less than half the requested tolerance and supplies the |
| 24 | extra derivative needed for the actual metric-isometry map estimate. -/ |
| 25 | theorem capPersistence_exists_old_transfer_accuracy (epsilon tau : ℝ) |
| 26 | (hepsilon : 0 < epsilon) (htau : 0 < tau) : |
| 27 | ∃ delta0 : ℝ, 0 < delta0 ∧ delta0 ≤ epsilon ∧ |
| 28 | ∀ delta : ℝ, 0 < delta → delta < delta0 → |
| 29 | Nat.floor epsilon⁻¹ + 1 ≤ Nat.floor delta⁻¹ ∧ |
| 30 | ∀ B : RoundCylinderTwoTensor, RoundCylinderClose delta 0 B → |
| 31 | ∀ (q : UnitTwoSphere) (s : ℝ), s ∈ Ioo (-delta⁻¹) delta⁻¹ → |
| 32 | ∀ j ≤ Nat.floor epsilon⁻¹, ∀ a b : Fin 3, |
| 33 | ‖iteratedFDeriv ℝ j (fun y => |
| 34 | roundCylinderTensorCoefficient B (chartAt E₂ q) y a b - |
| 35 | roundCylinderGram 0 (chartAt E₂ q) y a b) (0, s)‖ ≤ tau / 2 := by |
| 36 | let m := Nat.floor epsilon⁻¹ |
| 37 | obtain ⟨K, hK, hbound⟩ := capNeckNormalization_exists_old_error_jet_bound m |
| 38 | let delta0 := min epsilon (min ((m + 2 : ℕ) : ℝ)⁻¹ (tau / (2 * (K + 1)))) |
| 39 | have hdelta0 : 0 < delta0 := lt_min hepsilon (lt_min (by positivity) |
| 40 | (div_pos htau (by positivity))) |
| 41 | refine ⟨delta0, hdelta0, min_le_left _ _, ?_⟩ |
| 42 | intro delta hdelta hd |
| 43 | have hsmall : delta < ((m + 2 : ℕ) : ℝ)⁻¹ := |
| 44 | hd.trans_le ((min_le_right _ _).trans (min_le_left _ _)) |
| 45 | have hcast : ((m + 1 : ℕ) : ℝ) ≤ delta⁻¹ := by |
| 46 | have hi : ((m + 2 : ℕ) : ℝ) < delta⁻¹ := |
| 47 | by simpa only [inv_inv] using |
| 48 | (inv_lt_inv₀ (by positivity : 0 < ((m + 2 : ℕ) : ℝ)⁻¹) hdelta).mpr hsmall |
| 49 | have hstep : ((m + 1 : ℕ) : ℝ) ≤ ((m + 2 : ℕ) : ℝ) := by |
| 50 | exact_mod_cast Nat.le_succ (m + 1) |
| 51 | exact hstep.trans hi.le |
| 52 | have hm : m + 1 ≤ Nat.floor delta⁻¹ := |
| 53 | (Nat.le_floor_iff (inv_nonneg.mpr hdelta.le)).mpr hcast |
| 54 | refine ⟨hm, ?_⟩ |
| 55 | intro B hB q s hs j hj a b |
| 56 | have hdsmall : delta ≤ tau / (2 * (K + 1)) := |
| 57 | hd.le.trans ((min_le_right _ _).trans (min_le_right _ _)) |
| 58 | have hprod : delta * (2 * (K + 1)) ≤ tau := |
| 59 | (le_div_iff₀ (by positivity : 0 < 2 * (K + 1))).mp hdsmall |
| 60 | exact (hbound delta hdelta B hB (Nat.le_trans (Nat.le_succ m) hm) |
| 61 | q s hs j hj a b).trans (by nlinarith) |
| 62 | |
| 63 | end PoincareMT.M34 |