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.Persistence.SourceNames.Metric |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Coordinates.NormalizedCoefficients |
| 3 | import Mathlib.Topology.UniformSpace.UniformConvergence |
| 4 | |
| 5 | /-! |
| 6 | # Smooth compact convergence of the actual initial cap charts |
| 7 | |
| 8 | An intrinsic comparison tolerance tending to zero covers every fixed |
| 9 | compact coordinate set and every fixed derivative order. The resulting |
| 10 | normalized actual coefficients converge in every ordinary derivative. |
| 11 | This is the initial convergence in Morgan--Tian, Corollary 16.7, p. 372, |
| 12 | before the exact-ball adjustment of the maps. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology ENNReal |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M44 |
| 24 | |
| 25 | local notation "E" => StandardCapSpace |
| 26 | |
| 27 | noncomputable local instance : NormedAddCommGroup (E →L[ℝ] E →L[ℝ] ℝ) := |
| 28 | ContinuousLinearMap.toNormedAddCommGroup |
| 29 | |
| 30 | noncomputable local instance : NormedSpace ℝ (E →L[ℝ] E →L[ℝ] ℝ) := |
| 31 | ContinuousLinearMap.toNormedSpace |
| 32 | |
| 33 | /-- A single positive tolerance ensures both fixed compact containment |
| 34 | and the advertised finite jet order, as required in Corollary 16.7. -/ |
| 35 | theorem exists_initial_comparison_domain_threshold (g₀ : StandardInitialMetric) |
| 36 | {K : Set E} (hK : IsCompact K) (j : ℕ) : |
| 37 | ∃ delta : ℝ, 0 < delta ∧ ∀ eta : ℝ, 0 < eta → eta ≤ delta → |
| 38 | j ≤ ⌊eta⁻¹⌋₊ ∧ K ⊆ g₀.metric.ball 0 eta⁻¹ := by |
| 39 | obtain ⟨B, hB⟩ := hK.exists_bound_of_continuousOn |
| 40 | (((M36.radialArclength_contDiff g₀).continuous.comp continuous_norm).continuousOn) |
| 41 | have hden : 0 < |B| + (j : ℝ) + 1 := by positivity |
| 42 | refine ⟨(|B| + (j : ℝ) + 1)⁻¹, inv_pos.mpr hden, ?_⟩ |
| 43 | intro eta heta hsmall |
| 44 | have hinv := one_div_le_one_div_of_le heta hsmall |
| 45 | simp only [one_div, inv_inv] at hinv |
| 46 | refine ⟨(Nat.le_floor_iff (inv_pos.mpr heta).le).mpr (by linarith [abs_nonneg B]), ?_⟩ |
| 47 | intro x hx |
| 48 | change g₀.metric.edist 0 x < ENNReal.ofReal eta⁻¹ |
| 49 | rw [M36.standard_edist_zero, ENNReal.ofReal_lt_ofReal_iff (inv_pos.mpr heta)] |
| 50 | have hb : M36.radialArclength g₀ ‖x‖ ≤ |B| := |
| 51 | (le_abs_self _).trans ((hB x hx).trans (le_abs_self B)) |
| 52 | linarith [Nat.cast_nonneg (α := ℝ) j] |
| 53 | |
| 54 | /-- The squared intrinsic M36 error implies ordinary smooth convergence |
| 55 | on each compact set, even for a sequence of different output carriers. |
| 56 | Only the actual normalized comparison maps occur in this conclusion. -/ |
| 57 | theorem tendstoUniformlyOn_initial_coefficient_jets |
| 58 | (g₀ : StandardInitialMetric) |
| 59 | (S : ℕ → GeneralizedSliceCarrier.{u}) |
| 60 | (g : (n : ℕ) → RiemannianMetric 3 (S n).carrier) |
| 61 | (tip : (n : ℕ) → (S n).carrier) (scale eta : ℕ → ℝ) |
| 62 | (Q : (n : ℕ) → SurgeryCapClose g₀ (S n) (g n) (tip n) (scale n) (eta n)) |
| 63 | (heta : Tendsto eta atTop (𝓝 0)) |
| 64 | (j : ℕ) {K : Set E} (hK : IsCompact K) : |
| 65 | TendstoUniformlyOn (fun n => iteratedFDeriv ℝ j (Q n).normalizedCoefficients) |
| 66 | (iteratedFDeriv ℝ j g₀.metric.euclideanCoefficients) atTop K := by |
| 67 | obtain ⟨C, hC, hbound⟩ := SurgeryCapClose.exists_normalized_coefficient_jet_bound |
| 68 | g₀ hK j |
| 69 | obtain ⟨delta, hdelta, hdomain⟩ := exists_initial_comparison_domain_threshold g₀ hK j |
| 70 | have hfit : ∀ᶠ n in atTop, j ≤ ⌊(eta n)⁻¹⌋₊ ∧ K ⊆ g₀.metric.ball 0 (eta n)⁻¹ := by |
| 71 | filter_upwards [heta.eventually (gt_mem_nhds hdelta)] with n hn |
| 72 | exact hdomain (eta n) (Q n).eta_pos hn.le |
| 73 | have herror : Tendsto (fun n => C * eta n) atTop (𝓝 0) := by |
| 74 | simpa only [mul_zero] using heta.const_mul C |
| 75 | rw [Metric.tendstoUniformlyOn_iff] |
| 76 | intro epsilon hepsilon |
| 77 | filter_upwards [hfit, herror.eventually (gt_mem_nhds hepsilon)] with n hn herr |
| 78 | intro x hx |
| 79 | have hB : ContDiffAt ℝ ∞ (Q n).normalizedCoefficients x := |
| 80 | (Q n).contDiffOn_normalizedCoefficients.contDiffAt |
| 81 | ((Q n).toPartialDiffeomorph.open_source.mem_nhds (hn.2 hx)) |
| 82 | have hg := g₀.metric.contDiffAt_euclideanCoefficients x |
| 83 | have hb := hbound (S n) (g n) (tip n) (scale n) (eta n) (Q n) hn.1 hn.2 x hx |
| 84 | rw [iteratedFDeriv_sub_apply |
| 85 | (hB.of_le (by exact_mod_cast le_top)) (hg.of_le (by exact_mod_cast le_top))] at hb |
| 86 | simpa only [dist_eq_norm, norm_sub_rev] using hb.trans_lt herr |
| 87 | |
| 88 | end PoincareMT.M44 |