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.Metric.Standard.Radial.RadialWeights |
| 2 | import PoincareLib.Geometry.Riemannian.Connection.Euclidean |
| 3 | import Mathlib.Analysis.Calculus.ContDiff.Bounds |
| 4 | |
| 5 | /-! |
| 6 | # Smooth parameter families for the cap comparison |
| 7 | |
| 8 | Spatial derivatives keep the parameter fixed. Joint smoothness and |
| 9 | compactness give uniform finite-order bounds and uniform vanishing at the |
| 10 | base parameter. These estimates apply to the actual dilation and scalar |
| 11 | weights in the comparison of Morgan--Tian Claim 13.1, pp. 331-332. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | -- The metric coefficient norm contains two continuous-linear slots. |
| 17 | set_option maxSynthPendingDepth 12 |
| 18 | |
| 19 | open scoped ContDiff Topology BigOperators |
| 20 | |
| 21 | namespace PoincareMT.MetricSurgery |
| 22 | |
| 23 | section Families |
| 24 | |
| 25 | variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 26 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 27 | |
| 28 | theorem parametric_iteratedFDeriv_contDiff {f : ℝ → E → F} |
| 29 | (hf : ContDiff ℝ ∞ (Function.uncurry f)) (k : ℕ) : |
| 30 | ContDiff ℝ ∞ (fun p : ℝ × E => iteratedFDeriv ℝ k (f p.1) p.2) := by |
| 31 | induction k with |
| 32 | | zero => |
| 33 | exact hf.continuousLinearMap_comp |
| 34 | ((continuousMultilinearCurryFin0 ℝ E F).symm : |
| 35 | F →L[ℝ] ContinuousMultilinearMap ℝ (fun _ : Fin 0 => E) F) |
| 36 | | succ k ih => |
| 37 | have hpartial : ContDiff ℝ ∞ |
| 38 | (fun p : ℝ × E => fderiv ℝ (iteratedFDeriv ℝ k (f p.1)) p.2) := |
| 39 | (ih.comp ((contDiff_fst.fst).prodMk contDiff_snd)).fderiv |
| 40 | contDiff_snd (by simp) |
| 41 | exact hpartial.continuousLinearMap_comp |
| 42 | ((continuousMultilinearCurryLeftEquiv ℝ (fun _ : Fin (k + 1) => E) F).symm : |
| 43 | (E →L[ℝ] ContinuousMultilinearMap ℝ (fun _ : Fin k => E) F) →L[ℝ] |
| 44 | ContinuousMultilinearMap ℝ (fun _ : Fin (k + 1) => E) F) |
| 45 | |
| 46 | theorem parametric_jets_eventually_small {f : ℝ → E → F} |
| 47 | (hf : ContDiff ℝ ∞ (Function.uncurry f)) {t₀ : ℝ} |
| 48 | (hzero : f t₀ = fun _ => 0) {K : Set E} (hK : IsCompact K) |
| 49 | (m : ℕ) {eta : ℝ} (heta : 0 < eta) : |
| 50 | ∀ᶠ t in nhds t₀, ∀ k : ℕ, k ≤ m → ∀ x ∈ K, |
| 51 | ‖iteratedFDeriv ℝ k (f t) x‖ < eta := by |
| 52 | have hj (i : Fin (m + 1)) : ∀ᶠ t in nhds t₀, ∀ x ∈ K, |
| 53 | ‖iteratedFDeriv ℝ (i : ℕ) (f t) x‖ < eta := by |
| 54 | apply hK.eventually_forall_of_forall_eventually |
| 55 | intro x _ |
| 56 | have hcont := ((parametric_iteratedFDeriv_contDiff hf (i : ℕ)).continuous.continuousAt |
| 57 | (x := (t₀, x))).norm |
| 58 | have hbase : ‖iteratedFDeriv ℝ (i : ℕ) (f t₀) x‖ < eta := by |
| 59 | simpa [hzero] using heta |
| 60 | exact hcont.eventually (gt_mem_nhds hbase) |
| 61 | filter_upwards [Filter.eventually_all.mpr hj] with t ht k hk x hx |
| 62 | exact ht ⟨k, Nat.lt_succ_of_le hk⟩ x hx |
| 63 | |
| 64 | theorem exists_parametric_jet_bound {f : ℝ → E → F} |
| 65 | (hf : ContDiff ℝ ∞ (Function.uncurry f)) |
| 66 | {T : Set ℝ} (hT : IsCompact T) {K : Set E} (hK : IsCompact K) (m : ℕ) : |
| 67 | ∃ B : ℝ, 1 ≤ B ∧ ∀ t ∈ T, ∀ k : ℕ, k ≤ m → ∀ x ∈ K, |
| 68 | ‖iteratedFDeriv ℝ k (f t) x‖ ≤ B := by |
| 69 | classical |
| 70 | choose C hC using fun i : Fin (m + 1) => |
| 71 | (hT.prod hK).exists_bound_of_continuousOn |
| 72 | (parametric_iteratedFDeriv_contDiff hf (i : ℕ)).continuous.continuousOn |
| 73 | let B := 1 + ∑ i : Fin (m + 1), max (C i) 0 |
| 74 | have hsum : 0 ≤ ∑ i : Fin (m + 1), max (C i) 0 := |
| 75 | Finset.sum_nonneg (fun _ _ => le_max_right _ _) |
| 76 | refine ⟨B, by dsimp [B]; linarith only [hsum], ?_⟩ |
| 77 | intro t ht k hk x hx |
| 78 | let i : Fin (m + 1) := ⟨k, Nat.lt_succ_of_le hk⟩ |
| 79 | calc |
| 80 | _ ≤ C i := hC i (t, x) ⟨ht, hx⟩ |
| 81 | _ ≤ max (C i) 0 := le_max_left _ _ |
| 82 | _ ≤ ∑ j : Fin (m + 1), max (C j) 0 := |
| 83 | Finset.single_le_sum (fun _ _ => le_max_right _ _) (Finset.mem_univ i) |
| 84 | _ ≤ B := by dsimp [B]; linarith |
| 85 | |
| 86 | end Families |
| 87 | |
| 88 | theorem smoothProfile_joint_contDiff (C q : ℝ) : |
| 89 | ContDiff ℝ ∞ (fun p : ℝ × ℝ => smoothProfile C q p.1 p.2) := |
| 90 | (contDiff_const.mul contDiff_fst).mul |
| 91 | (expNegInvGlue.contDiff.comp (contDiff_snd.div_const q)) |
| 92 | |
| 93 | theorem conformalFactor_joint_contDiff (C q : ℝ) : |
| 94 | ContDiff ℝ ∞ (fun p : ℝ × ℝ => conformalFactor C q p.1 p.2) := |
| 95 | (contDiff_const.mul (smoothProfile_joint_contDiff C q)).exp |
| 96 | |
| 97 | theorem radialConformalMultiplier_joint_contDiff (g₀ : StandardInitialMetric) |
| 98 | (C q : ℝ) {r : ℝ} (hr : 0 < r) : |
| 99 | ContDiff ℝ ∞ |
| 100 | (fun p : ℝ × StandardCapSpace => radialConformalMultiplier g₀ C q p.1 r p.2) := by |
| 101 | apply contDiff_iff_contDiffAt.mpr |
| 102 | intro p |
| 103 | have htip : ContDiffAt ℝ ∞ |
| 104 | (fun z : ℝ × StandardCapSpace => |
| 105 | conformalFactor C q z.1 (g₀.cylindrical_end.radius + 4)) p := |
| 106 | (conformalFactor_joint_contDiff C q).contDiffAt.comp p |
| 107 | (contDiffAt_fst.prodMk contDiffAt_const) |
| 108 | by_cases hp : p.2 = 0 |
| 109 | · apply htip.congr_of_eventuallyEq |
| 110 | have hzero : ∀ᶠ z in nhds p, radialTipWeight g₀ r z.2 = 0 := by |
| 111 | have h := (continuous_snd.continuousAt (x := p)).tendsto.eventually |
| 112 | (hp ▸ radialTipWeight_eventually_zero g₀ hr) |
| 113 | exact h |
| 114 | filter_upwards [hzero] with z hz |
| 115 | simp [radialConformalMultiplier, hz] |
| 116 | · have hweight := (radialTipWeight_contDiff g₀ hr).contDiffAt.comp p contDiffAt_snd |
| 117 | have hheight := (standardSurgeryHeight_contDiffAt g₀ hp).comp p contDiffAt_snd |
| 118 | exact (hweight.mul ((conformalFactor_joint_contDiff C q).contDiffAt.comp p |
| 119 | (contDiffAt_fst.prodMk hheight))).add |
| 120 | ((contDiffAt_const.sub hweight).mul htip) |
| 121 | |
| 122 | theorem radialConformalMultiplier_zero (g₀ : StandardInitialMetric) (C q r : ℝ) |
| 123 | (x : StandardCapSpace) : radialConformalMultiplier g₀ C q 0 r x = 1 := by |
| 124 | simp [radialConformalMultiplier, conformalFactor, smoothProfile] |
| 125 | |
| 126 | noncomputable def standardDilationError (g₀ : StandardInitialMetric) (a : ℝ) |
| 127 | (x : StandardCapSpace) := |
| 128 | a ^ 2 • g₀.metric.euclideanCoefficients (a • x) - g₀.metric.euclideanCoefficients x |
| 129 | |
| 130 | theorem standardDilationError_joint_contDiff (g₀ : StandardInitialMetric) : |
| 131 | ContDiff ℝ ∞ (Function.uncurry (standardDilationError g₀)) := by |
| 132 | have hg : ContDiff ℝ ∞ g₀.metric.euclideanCoefficients := |
| 133 | contDiff_iff_contDiffAt.mpr g₀.metric.contDiffAt_euclideanCoefficients |
| 134 | exact ((contDiff_fst.pow 2).smul (hg.comp (contDiff_fst.smul contDiff_snd))).sub |
| 135 | (hg.comp contDiff_snd) |
| 136 | |
| 137 | theorem standardDilationError_one (g₀ : StandardInitialMetric) : |
| 138 | standardDilationError g₀ 1 = fun _ => 0 := by |
| 139 | funext x |
| 140 | simp [standardDilationError] |
| 141 | |
| 142 | theorem standardDilationError_jets_eventually_small (g₀ : StandardInitialMetric) |
| 143 | {K : Set StandardCapSpace} (hK : IsCompact K) (m : ℕ) {eta : ℝ} (heta : 0 < eta) : |
| 144 | ∀ᶠ a in nhds (1 : ℝ), ∀ k : ℕ, k ≤ m → ∀ x ∈ K, |
| 145 | ‖iteratedFDeriv ℝ k (standardDilationError g₀ a) x‖ < eta := |
| 146 | parametric_jets_eventually_small (standardDilationError_joint_contDiff g₀) |
| 147 | (standardDilationError_one g₀) hK m heta |
| 148 | |
| 149 | noncomputable def standardScalarError (g₀ : StandardInitialMetric) (C q r epsilon : ℝ) |
| 150 | (x : StandardCapSpace) := |
| 151 | (radialConformalMultiplier g₀ C q epsilon r x * |
| 152 | (1 - 6 * epsilon * (1 - radialNeckWeight g₀ x)) - 1) • |
| 153 | g₀.metric.euclideanCoefficients x |
| 154 | |
| 155 | theorem standardScalarError_joint_contDiff (g₀ : StandardInitialMetric) |
| 156 | (C q : ℝ) {r : ℝ} (hr : 0 < r) : |
| 157 | ContDiff ℝ ∞ (Function.uncurry (standardScalarError g₀ C q r)) := by |
| 158 | have hg : ContDiff ℝ ∞ g₀.metric.euclideanCoefficients := |
| 159 | contDiff_iff_contDiffAt.mpr g₀.metric.contDiffAt_euclideanCoefficients |
| 160 | have ha := (radialNeckWeight_contDiff g₀).comp |
| 161 | (contDiff_snd : ContDiff ℝ ∞ (Prod.snd : ℝ × StandardCapSpace → StandardCapSpace)) |
| 162 | exact (((radialConformalMultiplier_joint_contDiff g₀ C q hr).mul |
| 163 | (contDiff_const.sub ((contDiff_const.mul contDiff_fst).mul |
| 164 | (contDiff_const.sub ha)))).sub contDiff_const).smul (hg.comp contDiff_snd) |
| 165 | |
| 166 | theorem standardScalarError_zero (g₀ : StandardInitialMetric) (C q r : ℝ) : |
| 167 | standardScalarError g₀ C q r 0 = fun _ => 0 := by |
| 168 | funext x |
| 169 | simp [standardScalarError, radialConformalMultiplier_zero] |
| 170 | |
| 171 | theorem standardScalarError_jets_eventually_small (g₀ : StandardInitialMetric) |
| 172 | (C q : ℝ) {r : ℝ} (hr : 0 < r) {K : Set StandardCapSpace} (hK : IsCompact K) |
| 173 | (m : ℕ) {eta : ℝ} (heta : 0 < eta) : |
| 174 | ∀ᶠ epsilon in nhds (0 : ℝ), ∀ k : ℕ, k ≤ m → ∀ x ∈ K, |
| 175 | ‖iteratedFDeriv ℝ k (standardScalarError g₀ C q r epsilon) x‖ < eta := |
| 176 | parametric_jets_eventually_small (standardScalarError_joint_contDiff g₀ C q hr) |
| 177 | (standardScalarError_zero g₀ C q r) hK m heta |
| 178 | |
| 179 | end PoincareMT.MetricSurgery |