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.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.InitialAxialCoefficient |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.InitialCylinderFiniteJets |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.RadialCylinderTensor |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.VanishingMetricErrorJets |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.Neck.Jets.NeckPullbackSmoothness |
| 7 | |
| 8 | /-! |
| 9 | # Actual finite jets after the initial neck's scalar normalization |
| 10 | |
| 11 | Morgan-Tian Theorem 12.32, pp. 326-327. The original tensor is |
| 12 | evaluated at its actual affine clock and axially rescaled point. |
| 13 | Its metric error retains a vanishing factor in every derivative; |
| 14 | the remaining literal model error is the scalar-time normalization. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter |
| 21 | open scoped Manifold ContDiff Bundle Topology |
| 22 | |
| 23 | namespace PoincareMT.M35 |
| 24 | |
| 25 | local notation "V" => RoundCylinderCoordinates |
| 26 | local notation "E2" => EuclideanSpace ℝ (Fin 2) |
| 27 | |
| 28 | /-- The literal frozen jet error of the actual rescaled patch |
| 29 | vanishes at moving points, including varying preferred sphere charts. -/ |
| 30 | theorem initial_axial_jetError_tendsto_zero |
| 31 | (delta u v Q c s : ℕ → ℝ) (g : ℕ → RiemannianMetric 3 StandardCapSpace) |
| 32 | (x : ℕ → StandardCapSpace) (N : ∀ k, StandardCylinderPatch (delta k)⁻¹ (x k)) |
| 33 | (epsilon : ℝ) (he : 0 < epsilon) (hc : ∀ k, 0 < c k) |
| 34 | (hcl : ∀ k, c k * epsilon⁻¹ ≤ (delta k)⁻¹) |
| 35 | (q : ℕ → UnitTwoSphere) (order : ℕ) |
| 36 | (hd : ∀ k, 0 < delta k) (hvlo : ∀ k, -1 ≤ v k) (hvhi : ∀ k, v k < 1) |
| 37 | (hs : ∀ k, s k ∈ Ioo (-epsilon⁻¹) epsilon⁻¹) |
| 38 | (hclose : ∀ k, RoundCylinderClose (delta k) (v k) |
| 39 | (roundCylinderPullback (g k) (N k).coordinate)) |
| 40 | (hdegree : ∀ k, order ≤ ⌊(delta k)⁻¹⌋₊) |
| 41 | (hunit : ∀ k, Q k * c k ^ 2 = 1) |
| 42 | {u₀ Q₀ c₀ s₀ : ℝ} (hu : ∀ k, u k < 1) (hu₀ : u₀ < 1) |
| 43 | (hdlim : Tendsto delta atTop (𝓝 0)) (hulim : Tendsto u atTop (𝓝 u₀)) |
| 44 | (hQlim : Tendsto Q atTop (𝓝 Q₀)) (hclim : Tendsto c atTop (𝓝 c₀)) |
| 45 | (hslim : Tendsto s atTop (𝓝 s₀)) |
| 46 | (hnormal : Tendsto (fun k => Q k * (1 - v k) - (1 - u k)) atTop (𝓝 0)) : |
| 47 | Tendsto (fun k => roundCylinderJetErrorSquared (u k) |
| 48 | (fun z a b => Q k * roundCylinderPullback (g k) |
| 49 | ((N k).axialRescale (c k) epsilon⁻¹ (hc k) (inv_pos.mpr he) (hcl k)).coordinate |
| 50 | z a b) order (q k, s k)) atTop (𝓝 0) := by |
| 51 | let p (k : ℕ) : V := (0, s k) |
| 52 | let p₀ : V := (0, s₀) |
| 53 | let T (k : ℕ) (y : V) : V := (y.1, c k * y.2) |
| 54 | let M k := (N k).axialRescale (c k) epsilon⁻¹ (hc k) (inv_pos.mpr he) (hcl k) |
| 55 | let B (k : ℕ) : RoundCylinderTwoTensor := roundCylinderPullback (g k) (N k).coordinate |
| 56 | let C (k : ℕ) : RoundCylinderTwoTensor := |
| 57 | fun z a b => Q k * roundCylinderPullback (g k) (M k).coordinate z a b |
| 58 | have hp : Tendsto p atTop (𝓝 p₀) := tendsto_const_nhds.prodMk_nhds hslim |
| 59 | have hT (k : ℕ) : ContDiff ℝ ∞ (T k) := |
| 60 | contDiff_fst.prodMk (contDiff_const.mul contDiff_snd) |
| 61 | have hid : HasUniformJetBoundsAt order (fun _ : ℕ => (id : V → V)) p := by |
| 62 | intro j _hj |
| 63 | have hdiff : ContDiffAt ℝ ∞ (id : V → V) p₀ := contDiffAt_id |
| 64 | have hjet := (hdiff.continuousAt_iteratedFDeriv |
| 65 | (by exact_mod_cast le_top (a := (j : ℕ∞)))).tendsto.comp hp |
| 66 | obtain ⟨D, hD⟩ := (Metric.isBounded_range_of_tendsto _ hjet).exists_norm_le |
| 67 | exact ⟨D, fun k => hD _ (mem_range_self k)⟩ |
| 68 | have hcjet : HasUniformJetBoundsAt order (fun k (_ : V) => c k) p := by |
| 69 | intro j _hj |
| 70 | cases j with |
| 71 | | zero => |
| 72 | obtain ⟨D, hD⟩ := (Metric.isBounded_range_of_tendsto _ hclim).exists_norm_le |
| 73 | exact ⟨D, fun k => by |
| 74 | simpa only [norm_iteratedFDeriv_zero] using hD _ (mem_range_self k)⟩ |
| 75 | | succ j => |
| 76 | exact ⟨0, fun k => by |
| 77 | simp only [iteratedFDeriv_succ_const, Pi.zero_apply, norm_zero, le_refl]⟩ |
| 78 | have hfst := hid.clm (fun _ => contDiffAt_id) (ContinuousLinearMap.fst ℝ E2 ℝ) |
| 79 | have hsnd := hid.clm (fun _ => contDiffAt_id) (ContinuousLinearMap.snd ℝ E2 ℝ) |
| 80 | have hcs := hcjet.bilinear hsnd (fun _ => contDiffAt_const) (fun _ => contDiffAt_snd) |
| 81 | (ContinuousLinearMap.mul ℝ ℝ) |
| 82 | have hTjet : HasUniformJetBoundsAt order T p := |
| 83 | hfst.prodMk hcs (fun _ => contDiffAt_fst) |
| 84 | (fun _ => contDiffAt_const.mul contDiffAt_snd) |
| 85 | have hsource (k : ℕ) : c k * s k ∈ Ioo (-(delta k)⁻¹) (delta k)⁻¹ := by |
| 86 | have hlo := mul_lt_mul_of_pos_left (hs k).1 (hc k) |
| 87 | have hhi := mul_lt_mul_of_pos_left (hs k).2 (hc k) |
| 88 | constructor <;> nlinarith only [hlo, hhi, hcl k] |
| 89 | have hCsmooth (k : ℕ) (i j : Fin 3) : ContDiffAt ℝ ∞ |
| 90 | (fun y => roundCylinderTensorCoefficient (C k) (chartAt E2 (q k)) y i j) (p k) := by |
| 91 | have h := roundCylinderPullback_scaled_smoothOn (g k) (M k).coordinate epsilon |
| 92 | (Q k) (M k).coordinate_smooth |
| 93 | apply (h (q k) i j).contDiffAt |
| 94 | apply ((chartAt E2 (q k)).open_target.prod isOpen_Ioo).mem_nhds |
| 95 | exact ⟨by rw [sphere_chart_target]; trivial, hs k⟩ |
| 96 | have herr (r : ℕ) (hr : r ≤ order) (i j : Fin 3) : Tendsto |
| 97 | (fun k => iteratedFDeriv ℝ r (fun y => |
| 98 | roundCylinderTensorCoefficient (C k) (chartAt E2 (q k)) y i j - |
| 99 | roundCylinderGram (u k) (chartAt E2 (q k)) y i j) (p k)) atTop (𝓝 0) := by |
| 100 | let F (k : ℕ) (y : V) := |
| 101 | roundCylinderTensorCoefficient (B k) (chartAt E2 (q k)) y i j - |
| 102 | roundCylinderGram (v k) (chartAt E2 (q k)) y i j |
| 103 | let w (k : ℕ) (a : Fin 3) := if a = 2 then c k else 1 |
| 104 | let alpha (k : ℕ) := Q k * w k i * w k j |
| 105 | let mu (k : ℕ) := Q k * (1 - v k) - (1 - u k) |
| 106 | let H (y : V) := roundCylinderGram 0 (chartAt E2 (q 0)) y i j - |
| 107 | (roundCylinderCoordinateBasis i).2 * (roundCylinderCoordinateBasis j).2 |
| 108 | have hH : ContDiff ℝ ∞ H := (contDiff_roundCylinderGram 0 (q 0) i j).sub contDiff_const |
| 109 | have hF (k : ℕ) : ContDiffAt ℝ ∞ (F k) (T k (p k)) := |
| 110 | ((hclose k).contDiffAt_coefficient (q k) (0, c k * s k) (hsource k) i j).sub |
| 111 | (contDiff_roundCylinderGram (v k) (q k) i j).contDiffAt |
| 112 | have hFcomp (k : ℕ) : ContDiffAt ℝ ∞ (F k ∘ T k) (p k) := |
| 113 | (hF k).comp (p k) (hT k).contDiffAt |
| 114 | have hFjet : Tendsto (fun k => iteratedFDeriv ℝ r (F k ∘ T k) (p k)) |
| 115 | atTop (𝓝 0) := by |
| 116 | apply jet_comp_tendsto_zero_of_bounded (hTjet.mono_order hr) |
| 117 | (Eventually.of_forall fun k => (hT k).contDiffAt) (Eventually.of_forall hF) |
| 118 | intro m hm |
| 119 | exact cylinder_metric_error_jets_tendsto_zero delta v (fun k => c k * s k) B q |
| 120 | (c₀ * s₀) order hd hvlo hvhi hsource hclose hdegree hdlim (hclim.mul hslim) |
| 121 | m (hm.trans hr) i j |
| 122 | have hw (a : Fin 3) : Tendsto (fun k => w k a) atTop |
| 123 | (𝓝 (if a = 2 then c₀ else 1)) := by |
| 124 | by_cases ha : a = 2 |
| 125 | · simpa only [w, if_pos ha] using hclim |
| 126 | · simpa only [w, if_neg ha] using tendsto_const_nhds |
| 127 | have halpha := (hQlim.mul (hw i)).mul (hw j) |
| 128 | have hrinf : (r : ℕ∞ω) ≤ ∞ := by exact_mod_cast le_top (a := (r : ℕ∞)) |
| 129 | have hfirst : Tendsto (fun k => iteratedFDeriv ℝ r |
| 130 | (fun y => alpha k * F k (T k y)) (p k)) atTop (𝓝 0) := by |
| 131 | have h := halpha.smul hFjet |
| 132 | simp only [smul_zero] at h |
| 133 | apply h.congr' |
| 134 | apply Eventually.of_forall |
| 135 | intro k |
| 136 | exact (iteratedFDeriv_const_smul_apply' ((hFcomp k).of_le hrinf)).symm |
| 137 | have hHjet := (hH.contDiffAt.continuousAt_iteratedFDeriv |
| 138 | (by exact_mod_cast le_top (a := (r : ℕ∞)))).tendsto.comp hp |
| 139 | have hsecond : Tendsto (fun k => iteratedFDeriv ℝ r |
| 140 | (fun y => mu k * H y) (p k)) atTop (𝓝 0) := by |
| 141 | have h := hnormal.smul hHjet |
| 142 | simp only [zero_smul] at h |
| 143 | apply h.congr' |
| 144 | apply Eventually.of_forall |
| 145 | intro k |
| 146 | exact (iteratedFDeriv_const_smul_apply' (hH.contDiffAt.of_le hrinf)).symm |
| 147 | have hsum := hfirst.add hsecond |
| 148 | simp only [add_zero] at hsum |
| 149 | apply hsum.congr' |
| 150 | apply Eventually.of_forall |
| 151 | intro k |
| 152 | have heq : (fun y : V => roundCylinderTensorCoefficient (C k) |
| 153 | (chartAt E2 (q k)) y i j - roundCylinderGram (u k) (chartAt E2 (q k)) y i j) |
| 154 | =ᶠ[𝓝 (p k)] (fun y => alpha k * F k (T k y) + mu k * H y) := by |
| 155 | have hnear : ∀ᶠ y : V in 𝓝 (p k), y.2 ∈ Ioo (-epsilon⁻¹) epsilon⁻¹ := |
| 156 | (isOpen_Ioo.preimage continuous_snd).mem_nhds (hs k) |
| 157 | filter_upwards [hnear] with y hy |
| 158 | change Q k * roundCylinderTensorCoefficient |
| 159 | (roundCylinderPullback (g k) (M k).coordinate) (chartAt E2 (q k)) y i j - _ = _ |
| 160 | rw [initial_axial_patch_coefficient (g k) (N k) (c k) epsilon⁻¹ |
| 161 | (hc k) (inv_pos.mpr he) (hcl k) (q k) y hy i j] |
| 162 | have hm := initial_axial_model_error (Q k) (c k) (u k) (v k) (hunit k) (q k) y i j |
| 163 | have hang : roundCylinderGram 0 (chartAt E2 (q k)) y i j = |
| 164 | roundCylinderGram 0 (chartAt E2 (q 0)) y i j := by |
| 165 | rw [roundCylinderGram_apply, roundCylinderGram_apply] |
| 166 | rw [hang] at hm |
| 167 | dsimp only [alpha, w, F, T, mu, H, B] |
| 168 | linear_combination hm |
| 169 | have hadd := fun_iteratedFDeriv_add_apply |
| 170 | (((contDiffAt_const (c := alpha k)).mul (hFcomp k)).of_le hrinf) |
| 171 | (((contDiffAt_const (c := mu k)).mul hH.contDiffAt).of_le hrinf) |
| 172 | exact hadd.symm.trans ((heq.iteratedFDeriv ℝ r).eq_of_nhds).symm |
| 173 | have h := roundCylinderJetDifferenceSquared_tendsto_zero order u hu u₀ hu₀ hulim q C |
| 174 | (fun k => EvolvingRoundCylinderMetric (u k)) s s₀ hslim hCsmooth |
| 175 | (fun k i j => (contDiff_roundCylinderGram (u k) (q k) i j).contDiffAt) herr |
| 176 | simpa only [roundCylinderJetDifferenceSquared_model] using h |
| 177 | |
| 178 | end PoincareMT.M35 |