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.ReducedGeometry.LGeometry.Minimization.Charts.ChartCoefficients |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.Charts.ChartPerturbation |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.Charts.ChartStationarity |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.Charts.WeakVelocity |
| 5 | import Mathlib.Analysis.Calculus.LocalExtr.Basic |
| 6 | |
| 7 | /-! Adapted from Mapher `PoincareMT/Proofs/M08/ChartMinimizerRegularity.lean` at |
| 8 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ |
| 9 | |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open MeasureTheory Set Filter Topology |
| 15 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 16 | |
| 17 | universe uM |
| 18 | |
| 19 | namespace PoincareMT.LGeometry |
| 20 | |
| 21 | variable {n : ℕ} {M : Type uM} [MetricSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | |
| 24 | noncomputable local instance : NormedAddCommGroup (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 25 | ContinuousLinearMap.toNormedAddCommGroup |
| 26 | |
| 27 | noncomputable local instance : NormedSpace ℝ (EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 28 | ContinuousLinearMap.toNormedSpace |
| 29 | |
| 30 | noncomputable local instance : |
| 31 | NormedAddCommGroup (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 32 | ContinuousLinearMap.toNormedAddCommGroup |
| 33 | |
| 34 | noncomputable local instance : |
| 35 | NormedSpace ℝ (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) := |
| 36 | ContinuousLinearMap.toNormedSpace |
| 37 | |
| 38 | def IsChartH1Minimizer {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) |
| 39 | (x : M) (a b : ℝ) (γ : ℝ → M) (w : ChartL2 (EuclideanSpace ℝ (Fin n)) a b) : Prop := |
| 40 | ∀ (ξ : ℝ → M), ContinuousOn ξ (Icc a b) → ξ a = γ a → ξ b = γ b → |
| 41 | MapsTo ξ (Icc a b) (chartAt (EuclideanSpace ℝ (Fin n)) x).source → |
| 42 | ∀ v : ChartL2 (EuclideanSpace ℝ (Fin n)) a b, |
| 43 | (∀ s ∈ Icc a b, extChartAt (𝓡 n) x (ξ s) = extChartAt (𝓡 n) x (ξ a) + |
| 44 | ∫ r in a..s, v r) → |
| 45 | chartH1Action F T x a b γ w ≤ chartH1Action F T x a b ξ v |
| 46 | |
| 47 | set_option maxHeartbeats 800000 in |
| 48 | -- The action derivative carries three nested coefficient operators. |
| 49 | theorem chart_minimum_affine_stationary {J : Set ℝ} (F : RicciFlow n M J) |
| 50 | (hM04 : RicciFlowCurvatureTheory.{uM}) (T : ℝ) {a b : ℝ} (hab : a < b) |
| 51 | (x : M) (γ : ℝ → M) (hγ : ContinuousOn γ (Icc a b)) |
| 52 | (hsrc : MapsTo γ (Icc a b) (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 53 | (htime : ∀ s ∈ Icc a b, T - s ^ 2 ∈ interior J) |
| 54 | (w : ChartL2 (EuclideanSpace ℝ (Fin n)) a b) |
| 55 | (hw : ∀ s ∈ Icc a b, extChartAt (𝓡 n) x (γ s) = |
| 56 | extChartAt (𝓡 n) x (γ a) + ∫ r in a..s, w r) |
| 57 | (hmin : IsChartH1Minimizer F T x a b γ w) |
| 58 | (η ν : ℝ → EuclideanSpace ℝ (Fin n)) |
| 59 | (hη : ContinuousOn η (Icc a b)) (hν : ContinuousOn ν (Icc a b)) |
| 60 | (hd : ∀ s ∈ Ioo a b, HasDerivAt η (ν s) s) |
| 61 | (hηa : η a = 0) (hηb : η b = 0) : |
| 62 | (∫ s in a..b, |
| 63 | spatialFDeriv (chartActionMetric F T x) (s, extChartAt (𝓡 n) x (γ s)) |
| 64 | (η s) (w s) (w s) / 2 + |
| 65 | chartActionMetric F T x (s, extChartAt (𝓡 n) x (γ s)) (w s) (ν s) + |
| 66 | spatialFDeriv (chartActionPotential F T x) (s, extChartAt (𝓡 n) x (γ s)) (η s)) = 0 := by |
| 67 | let e := extChartAt (𝓡 n) x |
| 68 | let u : ℝ → EuclideanSpace ℝ (Fin n) := e ∘ γ |
| 69 | have hsrc' : MapsTo γ (Icc a b) e.source := by |
| 70 | simpa only [e, extChartAt_source] using hsrc |
| 71 | have hu : ContinuousOn u (Icc a b) := |
| 72 | (continuousOn_extChartAt (I := 𝓡 n) x).comp hγ hsrc' |
| 73 | obtain ⟨K, hK, hKt, huK, δ, hδ, hδ1, hδK⟩ := |
| 74 | exists_chart_affine_buffer x γ hγ hsrc η hη |
| 75 | obtain ⟨C, hC, hcoeff⟩ := chart_spatial_coefficient_bounds F hM04 T x K hK hKt htime |
| 76 | obtain ⟨D₁, hD₁⟩ := isCompact_Icc.exists_bound_of_continuousOn hη |
| 77 | obtain ⟨D₂, hD₂⟩ := isCompact_Icc.exists_bound_of_continuousOn hν |
| 78 | let D := |D₁| + |D₂| |
| 79 | have hD : 0 ≤ D := add_nonneg (abs_nonneg _) (abs_nonneg _) |
| 80 | have hdir : ∀ s ∈ Icc a b, ‖η s‖ ≤ D ∧ ‖ν s‖ ≤ D := by |
| 81 | intro s hs |
| 82 | have h₁ := hD₁ s hs |
| 83 | have h₂ := hD₂ s hs |
| 84 | dsimp only [D] |
| 85 | constructor <;> linarith [le_abs_self D₁, le_abs_self D₂, abs_nonneg D₁, abs_nonneg D₂] |
| 86 | have hsub : Icc a b ×ˢ K ⊆ chartActionDomain F T x := |
| 87 | fun z hz ↦ ⟨htime z.1 hz.1, hKt hz.2⟩ |
| 88 | have hG := chartActionMetric_contDiffOn F T x |
| 89 | have hV := chartActionPotential_contDiffOn F hM04 T x |
| 90 | have hDG := spatialFDeriv_continuousOn (chartActionDomain_open F T x) _ hG |
| 91 | have hDV := spatialFDeriv_continuousOn (chartActionDomain_open F T x) _ hV |
| 92 | let f : ℝ → ℝ := fun ε ↦ ∫ s in a..b, |
| 93 | chartActionMetric F T x (s, u s + ε • η s) (w s + ε • ν s) (w s + ε • ν s) / 2 + |
| 94 | chartActionPotential F T x (s, u s + ε • η s) |
| 95 | have hf := (affine_chart_action_hasDerivAt hab.le hδ hδ1 hC hD K u w η ν hu |
| 96 | (Lp.memLp w) hη hν |
| 97 | (fun s v ↦ chartActionMetric F T x (s, v)) |
| 98 | (fun s v ↦ chartActionPotential F T x (s, v)) |
| 99 | (fun s v ↦ spatialFDeriv (chartActionMetric F T x) (s, v)) |
| 100 | (fun s v ↦ spatialFDeriv (chartActionPotential F T x) (s, v)) |
| 101 | (hG.continuousOn.mono hsub) (hV.continuousOn.mono hsub) |
| 102 | (hDG.mono hsub) (hDV.mono hsub) |
| 103 | (fun ε hε s hs ↦ hδK ε (abs_lt.mpr hε) hs) |
| 104 | (fun s hs v hv ↦ hasFDerivAt_spatial (chartActionDomain_open F T x) _ hG |
| 105 | (hsub ⟨hs, hv⟩)) |
| 106 | (fun s hs v hv ↦ hasFDerivAt_spatial (chartActionDomain_open F T x) _ hV |
| 107 | (hsub ⟨hs, hv⟩)) |
| 108 | (fun s hs v hv ↦ chartActionMetric_symm F T x (hsub ⟨hs, hv⟩)) |
| 109 | hcoeff hdir).2 |
| 110 | have hνLp : MemLp ν 2 (volume.restrict (Icc a b)) := |
| 111 | (continuousOn_memLp_top_Icc hν).mono_exponent le_top |
| 112 | have hbase : chartH1Action F T x a b γ w = f 0 := by |
| 113 | have h := chartH1Action_eq_coordinate_integral F hM04 T hab.le x γ hγ hsrc |
| 114 | (fun s hs ↦ interior_subset (htime s hs)) u |
| 115 | (fun s hs ↦ (e.left_inv (hsrc' hs)).symm) w w Filter.EventuallyEq.rfl |
| 116 | simpa only [f, zero_smul, add_zero] using h |
| 117 | have hlocal : IsLocalMin f 0 := by |
| 118 | have hnhds : Ioo (-δ) δ ∈ 𝓝 (0 : ℝ) := Ioo_mem_nhds (neg_lt_zero.mpr hδ) hδ |
| 119 | filter_upwards [hnhds] with ε hε |
| 120 | have htarget : MapsTo (fun s ↦ e (γ s) + ε • η s) (Icc a b) e.target := |
| 121 | fun s hs ↦ hKt (hδK ε (abs_lt.mpr hε) hs) |
| 122 | obtain ⟨ξ, v, hξ, hξa, hξb, hξsrc, hξdef, hv, _, hvprimitive⟩ := |
| 123 | chart_affine_competitor hab.le x γ hγ hsrc w hw η ν hη hd hνLp hηa hηb ε htarget |
| 124 | have haction := chartH1Action_eq_coordinate_integral F hM04 T hab.le x ξ hξ hξsrc |
| 125 | (fun s hs ↦ interior_subset (htime s hs)) (fun s ↦ u s + ε • η s) |
| 126 | (fun s _ ↦ hξdef s) v (fun s ↦ w s + ε • ν s) hv |
| 127 | change chartH1Action F T x a b ξ v = f ε at haction |
| 128 | rw [← hbase, ← haction] |
| 129 | exact hmin ξ hξ hξa hξb hξsrc v hvprimitive |
| 130 | exact hlocal.hasDerivAt_eq_zero hf |
| 131 | |
| 132 | set_option maxHeartbeats 800000 in |
| 133 | -- The weak momentum proof identifies the chart operator with its Riesz representative. |
| 134 | theorem chart_minimum_contDiffOn {J : Set ℝ} (F : RicciFlow n M J) |
| 135 | (hM04 : RicciFlowCurvatureTheory.{uM}) (T : ℝ) {a b : ℝ} (hab : a < b) |
| 136 | (x : M) (γ : ℝ → M) (hγ : ContinuousOn γ (Icc a b)) |
| 137 | (hsrc : MapsTo γ (Icc a b) (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 138 | (htime : ∀ s ∈ Icc a b, T - s ^ 2 ∈ interior J) |
| 139 | (w : ChartL2 (EuclideanSpace ℝ (Fin n)) a b) |
| 140 | (hw : ∀ s ∈ Icc a b, extChartAt (𝓡 n) x (γ s) = |
| 141 | extChartAt (𝓡 n) x (γ a) + ∫ r in a..s, w r) |
| 142 | (hmin : IsChartH1Minimizer F T x a b γ w) : |
| 143 | ContDiffOn ℝ 1 ((extChartAt (𝓡 n) x) ∘ γ) (Icc a b) := by |
| 144 | let e := extChartAt (𝓡 n) x |
| 145 | let u : ℝ → EuclideanSpace ℝ (Fin n) := e ∘ γ |
| 146 | have hsrc' : MapsTo γ (Icc a b) e.source := by |
| 147 | simpa only [e, extChartAt_source] using hsrc |
| 148 | have hu : ContinuousOn u (Icc a b) := |
| 149 | (continuousOn_extChartAt (I := 𝓡 n) x).comp hγ hsrc' |
| 150 | have hpair : ContinuousOn (fun s ↦ (s, u s)) (Icc a b) := continuousOn_id.prodMk hu |
| 151 | have hdom : MapsTo (fun s ↦ (s, u s)) (Icc a b) (chartActionDomain F T x) := |
| 152 | fun s hs ↦ ⟨htime s hs, e.map_source (hsrc' hs)⟩ |
| 153 | let G := fun s ↦ chartActionMetric F T x (s, u s) |
| 154 | let DG := fun s ↦ spatialFDeriv (chartActionMetric F T x) (s, u s) |
| 155 | let DV := fun s ↦ spatialFDeriv (chartActionPotential F T x) (s, u s) |
| 156 | have hG : ContinuousOn G (Icc a b) := |
| 157 | (chartActionMetric_contDiffOn F T x).continuousOn.comp hpair hdom |
| 158 | have hDG : ContinuousOn DG (Icc a b) := |
| 159 | (spatialFDeriv_continuousOn (chartActionDomain_open F T x) _ |
| 160 | (chartActionMetric_contDiffOn F T x)).comp hpair hdom |
| 161 | have hDV : ContinuousOn DV (Icc a b) := |
| 162 | (spatialFDeriv_continuousOn (chartActionDomain_open F T x) _ |
| 163 | (chartActionPotential_contDiffOn F hM04 T x)).comp hpair hdom |
| 164 | obtain ⟨C₀, hC₀⟩ := isCompact_Icc.exists_bound_of_continuousOn hG |
| 165 | obtain ⟨C₁, hC₁⟩ := isCompact_Icc.exists_bound_of_continuousOn hDG |
| 166 | obtain ⟨C₂, hC₂⟩ := isCompact_Icc.exists_bound_of_continuousOn hDV |
| 167 | let C := |C₀| + |C₁| + |C₂| |
| 168 | have hC : 0 ≤ C := by dsimp [C]; positivity |
| 169 | have hbound : ∀ s ∈ Icc a b, ‖G s‖ ≤ C ∧ ‖DG s‖ ≤ C ∧ ‖DV s‖ ≤ C := by |
| 170 | intro s hs |
| 171 | have h₀ := hC₀ s hs |
| 172 | have h₁ := hC₁ s hs |
| 173 | have h₂ := hC₂ s hs |
| 174 | dsimp only [C] |
| 175 | refine ⟨?_, ?_, ?_⟩ <;> |
| 176 | linarith [le_abs_self C₀, le_abs_self C₁, le_abs_self C₂, |
| 177 | abs_nonneg C₀, abs_nonneg C₁, abs_nonneg C₂] |
| 178 | let A := fun s ↦ chartMetricOperator F T x (s, u s) |
| 179 | let B := fun s ↦ Ring.inverse (A s) |
| 180 | let Q := fun s ↦ chartForceVector (DG s) (DV s) (w s) |
| 181 | have hA : ContinuousOn A (Icc a b) := |
| 182 | (chartMetricOperator_contDiffOn F T x).continuousOn.comp hpair hdom |
| 183 | have hB : ContinuousOn B (Icc a b) := |
| 184 | (chartMetricInverse_contDiffOn F T x).continuousOn.comp hpair hdom |
| 185 | have hinv : ∀ s ∈ Icc a b, ∀ v : EuclideanSpace ℝ (Fin n), B s (A s v) = v := |
| 186 | fun s hs v ↦ inverse_operator_apply _ (chartMetricOperator_isUnit F T x (hdom hs)) v |
| 187 | have hmomentum (s : ℝ) : A s (w s) = chartMomentumVector (G s) (w s) := rfl |
| 188 | obtain ⟨hP, hQ⟩ := chart_momentum_force_intervalIntegrable hab.le hC w (Lp.memLp w) |
| 189 | G DG DV hG hDG hDV hbound |
| 190 | have hweak : ∀ φ : ℝ → ℝ, ContDiff ℝ ∞ φ → HasCompactSupport φ → |
| 191 | tsupport φ ⊆ Ioo a b → (∫ s in a..b, deriv φ s • A s (w s)) = |
| 192 | -(∫ s in a..b, φ s • Q s) := by |
| 193 | intro φ hφ _ hφsupp |
| 194 | have hφa : φ a = 0 := image_eq_zero_of_notMem_tsupport |
| 195 | (fun ha ↦ (lt_irrefl a) (hφsupp ha).1) |
| 196 | have hφb : φ b = 0 := image_eq_zero_of_notMem_tsupport |
| 197 | (fun hb ↦ (lt_irrefl b) (hφsupp hb).2) |
| 198 | have hstationary (z : EuclideanSpace ℝ (Fin n)) : |
| 199 | (∫ s in a..b, DG s (φ s • z) (w s) (w s) / 2 + |
| 200 | G s (w s) (deriv φ s • z) + DV s (φ s • z)) = 0 := by |
| 201 | apply chart_minimum_affine_stationary F hM04 T hab x γ hγ hsrc htime w hw hmin |
| 202 | (fun s ↦ φ s • z) (fun s ↦ deriv φ s • z) |
| 203 | (hφ.continuous.continuousOn.smul continuousOn_const) |
| 204 | ((hφ.continuous_deriv (by simp)).continuousOn.smul continuousOn_const) |
| 205 | · intro s _ |
| 206 | exact ((hφ.differentiable (by simp)) s).hasDerivAt.smul_const z |
| 207 | · simp only [hφa, zero_smul] |
| 208 | · simp only [hφb, zero_smul] |
| 209 | exact (weak_momentum_of_chart_stationarity hab.le hC w (Lp.memLp w) |
| 210 | G DG DV hG hDG hDV hbound φ hφ hstationary).2.2 |
| 211 | obtain ⟨c, q, _, _, _, _, _, _, hreg⟩ := weak_velocity_regular hab u w hw A B hA hB hinv |
| 212 | Q hQ hP hweak |
| 213 | exact hreg |
| 214 | |
| 215 | end PoincareMT.LGeometry |