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