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.SelectedCurvatureDerivativeRealization |
| 3 | |
| 4 | /-! |
| 5 | # First curvature-derivative control on moving selected points |
| 6 | |
| 7 | The actual exhaustion cylinders and their metric jets retain the first |
| 8 | covariant curvature norm of the scalar-normalized original slices. The next |
| 9 | retained-ball step uses this convergence on a compact basepoint chart. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | namespace PoincareMT.M35.OrdinaryRealization |
| 19 | |
| 20 | local notation "V" => EuclideanSpace ℝ (Fin 3) |
| 21 | |
| 22 | @[instance_reducible] private noncomputable def selectedDerivativeCovectorNormedGroup : |
| 23 | NormedAddCommGroup (V →L[ℝ] ℝ) := inferInstance |
| 24 | attribute [local instance] selectedDerivativeCovectorNormedGroup |
| 25 | |
| 26 | @[instance_reducible] private noncomputable def selectedDerivativeBilinearNormedGroup : |
| 27 | NormedAddCommGroup (V →L[ℝ] V →L[ℝ] ℝ) := inferInstance |
| 28 | attribute [local instance] selectedDerivativeBilinearNormedGroup |
| 29 | |
| 30 | /-- At every moving point in a compact limit chart, the first actual |
| 31 | covariant curvature norm of the selected normalized metric converges. -/ |
| 32 | theorem blowupSequence_terminal_curvature_derivative_tendsto_chart |
| 33 | (P : M35StandardCapPredecessors) |
| 34 | {g₀ : StandardInitialMetric} (E : RepairedStandardCapExistenceData g₀) |
| 35 | (t : ℕ → ℝ) (x : ℕ → StandardCapSpace) |
| 36 | (ht : ∀ k, t k ∈ Ico 0 E.flow.base.lifetime) |
| 37 | (hR : Tendsto (fun k => (E.flow.connection (t k)).scalarCurvature (x k)) atTop atTop) |
| 38 | (L : GeneralizedBlowupConvergence (blowupSequence P E t x ht hR) |
| 39 | (blowupBackwardInterval ⊤)) |
| 40 | (q : L.limit.sliceCarrier.carrier) (j : ℕ) |
| 41 | (K : Set V) (hK : IsCompact K) |
| 42 | (hKU : K ⊆ {p | p ∈ (extChartAt (𝓡 3) q).target ∧ |
| 43 | (extChartAt (𝓡 3) q).symm p ∈ L.exhaustion.space j}) |
| 44 | (sigma : ℕ → ℕ) (hsigma : Tendsto sigma atTop atTop) |
| 45 | (pseq : ℕ → V) (hpseq : ∀ k, pseq k ∈ K) |
| 46 | (p : V) (hp : p ∈ K) (hplim : Tendsto pseq atTop (𝓝 p)) : |
| 47 | letI : TopologicalSpace L.limit.carrier.carrier := L.limit.carrier.topologicalSpace |
| 48 | letI : ChartedSpace V L.limit.carrier.carrier := L.limit.carrier.chartedSpace |
| 49 | letI : IsManifold (𝓡 3) ∞ L.limit.carrier.carrier := L.limit.carrier.isManifold |
| 50 | let Q k := (blowupSequence P E t x ht hR).scale (L.subsequence (sigma k)) |
| 51 | let hQ k := (blowupSequence P E t x ht hR).base_scalar_pos (L.subsequence (sigma k)) |
| 52 | let y k := ((L.embedding (sigma k)).forward 0 |
| 53 | ⟨neg_nonpos.mpr (L.exhaustion.time_pos (sigma k)).le, le_rfl⟩ |
| 54 | ((extChartAt (𝓡 3) q).symm (pseq k))).val |
| 55 | Tendsto (fun k => (M13.scaleLeviCivitaData |
| 56 | (E.flow.connection (t (L.subsequence (sigma k)))) |
| 57 | (Q k) (hQ k)).curvatureDerivativeNorm 1 (y k)) atTop |
| 58 | (𝓝 ((L.limit.flow.connection 0).curvatureDerivativeNorm 1 |
| 59 | ((extChartAt (𝓡 3) q).symm p))) := by |
| 60 | classical |
| 61 | let : TopologicalSpace L.limit.carrier.carrier := L.limit.carrier.topologicalSpace |
| 62 | let : ChartedSpace V L.limit.carrier.carrier := L.limit.carrier.chartedSpace |
| 63 | have : IsManifold (𝓡 3) ∞ L.limit.carrier.carrier := L.limit.carrier.isManifold |
| 64 | let c := extChartAt (𝓡 3) (show L.limit.carrier.carrier from q) |
| 65 | have hc (z : V) (hz : z ∈ c.target) : ContMDiffAt (𝓡 3) (𝓡 3) ∞ c.symm z := |
| 66 | (contMDiffOn_extChartAt_symm (n := ∞) |
| 67 | (show L.limit.carrier.carrier from q)).contMDiffAt |
| 68 | ((isOpen_extChartAt_target (I := 𝓡 3) |
| 69 | (show L.limit.carrier.carrier from q)).mem_nhds hz) |
| 70 | have hci (z : V) (hz : z ∈ c.target) : |
| 71 | (mfderiv (𝓡 3) (𝓡 3) c.symm z).IsInvertible := by |
| 72 | simpa only [ModelWithCorners.range_eq_univ, mfderivWithin_univ] using |
| 73 | isInvertible_mfderivWithin_extChartAt_symm |
| 74 | (I := 𝓡 3) (x := (show L.limit.carrier.carrier from q)) hz |
| 75 | obtain ⟨g, D, hcoeff, hnorm⟩ := exists_local_curvature_derivative_realization |
| 76 | (L.limit.flow.metric 0) (L.limit.flow.connection 0) c.symm |
| 77 | (isOpen_extChartAt_target (show L.limit.carrier.carrier from q)) (hKU hp).1 hc hci |
| 78 | let B (k : ℕ) (a b : Fin 3) (z : V) := |
| 79 | fixedCylinderMetricCoefficient E.flow.base.flow L.limit.sliceCarrier |
| 80 | (t (L.subsequence k)) ((blowupSequence P E t x ht hR).scale (L.subsequence k)) |
| 81 | (fun w => ((L.embedding k).forward 0 |
| 82 | ⟨neg_nonpos.mpr (L.exhaustion.time_pos k).le, le_rfl⟩ w).val) q a b (0, z) |
| 83 | let H (a b : Fin 3) (z : V) := |
| 84 | (L.limit.flow.metric 0).pullbackCoefficients c.symm z |
| 85 | (EuclideanSpace.basisFun (Fin 3) ℝ a) (EuclideanSpace.basisFun (Fin 3) ℝ b) |
| 86 | let Q k := (blowupSequence P E t x ht hR).scale (L.subsequence (sigma k)) |
| 87 | let hQ k := (blowupSequence P E t x ht hR).base_scalar_pos (L.subsequence (sigma k)) |
| 88 | let y k := ((L.embedding (sigma k)).forward 0 |
| 89 | ⟨neg_nonpos.mpr (L.exhaustion.time_pos (sigma k)).le, le_rfl⟩ (c.symm (pseq k))).val |
| 90 | have hreal : ∀ᶠ k : ℕ in atTop, |
| 91 | ∃ gd : Σ g' : RiemannianMetric 3 V, LeviCivitaData g', |
| 92 | (∀ᶠ z in 𝓝 (pseq k), ∀ a b : Fin 3, |
| 93 | gd.1.euclideanCoefficients z (EuclideanSpace.basisFun (Fin 3) ℝ a) |
| 94 | (EuclideanSpace.basisFun (Fin 3) ℝ b) = B (sigma k) a b z) ∧ |
| 95 | gd.2.curvatureDerivativeNorm 1 (pseq k) = |
| 96 | (M13.scaleLeviCivitaData (E.flow.connection (t (L.subsequence (sigma k)))) |
| 97 | (Q k) (hQ k)).curvatureDerivativeNorm 1 (y k) := by |
| 98 | filter_upwards [hsigma.eventually (eventually_ge_atTop j)] with k hk |
| 99 | have hzero : (0 : ℝ) ∈ Icc (-L.exhaustion.time (sigma k)) 0 := |
| 100 | ⟨neg_nonpos.mpr (L.exhaustion.time_pos (sigma k)).le, le_rfl⟩ |
| 101 | obtain ⟨gk, Dk, hco, hno⟩ := exists_cylinder_curvature_derivative_realization |
| 102 | E.flow.base.flow (L.embedding (sigma k)) (L.exhaustion.space_open (sigma k)) hzero |
| 103 | ((L.embedding (sigma k)).forward 0 hzero L.limit.base).property q (hKU (hpseq k)).1 |
| 104 | (L.exhaustion.space_increasing hk (hKU (hpseq k)).2) |
| 105 | exact ⟨⟨gk, Dk⟩, hco, hno⟩ |
| 106 | obtain ⟨gd, hgd⟩ := hreal.choice |
| 107 | have hlimcoeff (a b : Fin 3) : |
| 108 | (fun z => g.inner z (EuclideanSpace.basisFun (Fin 3) ℝ a) |
| 109 | (EuclideanSpace.basisFun (Fin 3) ℝ b)) =ᶠ[𝓝 p] H a b := by |
| 110 | filter_upwards [hcoeff] with z hz |
| 111 | exact congrArg (fun A : V →L[ℝ] V →L[ℝ] ℝ => |
| 112 | A (EuclideanSpace.basisFun (Fin 3) ℝ a) (EuclideanSpace.basisFun (Fin 3) ℝ b)) hz |
| 113 | have hjets (r : ℕ) : Tendsto |
| 114 | (fun k => iteratedFDeriv ℝ r (gd k).1.euclideanCoefficients (pseq k)) atTop |
| 115 | (𝓝 (iteratedFDeriv ℝ r g.euclideanCoefficients p)) := by |
| 116 | apply metric_jet_tendsto_of_scalar_jets |
| 117 | intro a b |
| 118 | rw [(hlimcoeff a b).iteratedFDeriv ℝ r |>.self_of_nhds] |
| 119 | have herr : Tendsto (fun k => iteratedFDeriv ℝ r (B (sigma k) a b) (pseq k) - |
| 120 | iteratedFDeriv ℝ r (H a b) (pseq k)) atTop (𝓝 0) := by |
| 121 | apply Metric.tendsto_nhds.mpr |
| 122 | intro eta heta |
| 123 | obtain ⟨N, _, hN⟩ := blowupSequence_terminal_spatial_CInfinity P E t x ht hR L q |
| 124 | j r K hK hKU eta heta |
| 125 | filter_upwards [hsigma.eventually (eventually_ge_atTop N)] with k hk |
| 126 | have hnk := hN (sigma k) hk a b (pseq k) (hpseq k) |
| 127 | change ‖iteratedFDeriv ℝ r (B (sigma k) a b) (pseq k) - |
| 128 | iteratedFDeriv ℝ r (H a b) (pseq k)‖ < eta at hnk |
| 129 | simpa only [dist_zero_right] using hnk |
| 130 | have hmetric := ((L.limit.flow.metric 0).contDiffOn_chartCoefficients |
| 131 | (show L.limit.carrier.carrier from q)).contDiffAt |
| 132 | ((isOpen_extChartAt_target (I := 𝓡 3) |
| 133 | (show L.limit.carrier.carrier from q)).mem_nhds (hKU hp).1) |
| 134 | have hsecond : ContDiffAt ℝ ∞ (H a b) p := |
| 135 | (hmetric.clm_apply (contDiffAt_const (c := EuclideanSpace.basisFun (Fin 3) ℝ a))).clm_apply |
| 136 | (contDiffAt_const (c := EuclideanSpace.basisFun (Fin 3) ℝ b)) |
| 137 | have hr : (r : ℕ∞ω) ≤ ∞ := by exact_mod_cast le_top (a := (r : ℕ∞)) |
| 138 | have hmodel := (hsecond.continuousAt_iteratedFDeriv hr).tendsto.comp hplim |
| 139 | have hjet : Tendsto (fun k => iteratedFDeriv ℝ r (B (sigma k) a b) (pseq k)) atTop |
| 140 | (𝓝 (iteratedFDeriv ℝ r (H a b) p)) := by |
| 141 | simpa only [Function.comp_apply, sub_add_cancel, zero_add] using herr.add hmodel |
| 142 | apply hjet.congr' |
| 143 | filter_upwards [hgd] with k hk |
| 144 | have heq : (fun z => (gd k).1.inner z (EuclideanSpace.basisFun (Fin 3) ℝ a) |
| 145 | (EuclideanSpace.basisFun (Fin 3) ℝ b)) =ᶠ[𝓝 (pseq k)] B (sigma k) a b := |
| 146 | hk.1.mono (fun z hz => hz a b) |
| 147 | exact ((heq.iteratedFDeriv ℝ r).self_of_nhds).symm |
| 148 | have h := curvatureDerivativeNorm_one_tendsto_of_metric_jets |
| 149 | (fun k => (gd k).2) D pseq p (fun r _ => hjets r) |
| 150 | rw [hnorm] at h |
| 151 | exact h.congr' (hgd.mono (fun _ hk => hk.2)) |
| 152 | |
| 153 | end PoincareMT.M35.OrdinaryRealization |