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 Mathlib.Analysis.Normed.Operator.BoundedLinearMaps |
| 2 | import Mathlib.Analysis.Normed.Module.FiniteDimension |
| 3 | import Mathlib.Topology.Order.Compact |
| 4 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Path.ReferenceEnergy |
| 5 | import Mathlib.Geometry.Manifold.MFDeriv.Atlas |
| 6 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.Charts.ChartPrimitive |
| 7 | import Mathlib.Analysis.Calculus.FDeriv.Measurable |
| 8 | |
| 9 | /-! Adapted from Mapher `PoincareMT/Proofs/M08/ChartCoercivity.lean` at |
| 10 | `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. -/ |
| 11 | |
| 12 | |
| 13 | /-! |
| 14 | # Uniform chart coercivity |
| 15 | |
| 16 | A compact chart core turns positive definiteness into the uniform lower |
| 17 | bound needed for the L2 chart velocities in the direct method. |
| 18 | -/ |
| 19 | |
| 20 | set_option autoImplicit false |
| 21 | set_option backward.isDefEq.respectTransparency false |
| 22 | |
| 23 | open Set |
| 24 | |
| 25 | namespace PoincareMT.LGeometry |
| 26 | |
| 27 | theorem compact_positive_forms_coercive {X E : Type*} [TopologicalSpace X] |
| 28 | [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] |
| 29 | {K : Set X} (hK : IsCompact K) (B : X → E →L[ℝ] E →L[ℝ] ℝ) |
| 30 | (hB : ContinuousOn B K) |
| 31 | (hpos : ∀ x ∈ K, ∀ v : E, v ≠ 0 → 0 < B x v v) : |
| 32 | ∃ c : ℝ, 0 < c ∧ ∀ x ∈ K, ∀ v : E, c * ‖v‖ ^ 2 ≤ B x v v := by |
| 33 | have hcont : ContinuousOn (fun z : X × E ↦ B z.1 z.2 z.2) |
| 34 | (K ×ˢ Metric.sphere (0 : E) 1) := |
| 35 | ((hB.comp continuous_fst.continuousOn (fun z hz ↦ hz.1)).clm_apply |
| 36 | continuous_snd.continuousOn).clm_apply continuous_snd.continuousOn |
| 37 | obtain ⟨c, hc, hmin⟩ := (hK.prod (isCompact_sphere (0 : E) 1)).exists_forall_le' |
| 38 | hcont (fun z hz ↦ hpos z.1 hz.1 z.2 (by |
| 39 | intro hv |
| 40 | simpa [hv] using hz.2)) |
| 41 | refine ⟨c, hc, ?_⟩ |
| 42 | intro x hx v |
| 43 | by_cases hv : v = 0 |
| 44 | · simp [hv] |
| 45 | have hn : ‖v‖ ≠ 0 := norm_ne_zero_iff.mpr hv |
| 46 | let w : E := ‖v‖⁻¹ • v |
| 47 | have hw : w ∈ Metric.sphere (0 : E) 1 := by |
| 48 | rw [mem_sphere_zero_iff_norm] |
| 49 | simp [w, norm_smul, abs_of_pos (inv_pos.mpr (norm_pos_iff.mpr hv)), hn] |
| 50 | have h := mul_le_mul_of_nonneg_left (hmin (x, w) ⟨hx, hw⟩) (sq_nonneg ‖v‖) |
| 51 | calc |
| 52 | c * ‖v‖ ^ 2 = ‖v‖ ^ 2 * c := mul_comm _ _ |
| 53 | _ ≤ ‖v‖ ^ 2 * B x w w := h |
| 54 | _ = B x v v := by |
| 55 | simp only [w, map_smul, smul_apply, smul_eq_mul] |
| 56 | field_simp |
| 57 | |
| 58 | end PoincareMT.LGeometry |
| 59 | |
| 60 | open scoped Manifold ContDiff Bundle |
| 61 | |
| 62 | namespace PoincareMT.LGeometry |
| 63 | |
| 64 | universe u |
| 65 | |
| 66 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 67 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 68 | |
| 69 | /-- The actual metric written in a fixed tangent trivialization. -/ |
| 70 | noncomputable def metricInChart (g : RiemannianMetric n M) (x y : M) : |
| 71 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ := |
| 72 | (trivializationAt |
| 73 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 74 | (fun z : M ↦ TangentSpace (𝓡 n) z →L[ℝ] TangentSpace (𝓡 n) z →L[ℝ] ℝ) x |
| 75 | (Bundle.TotalSpace.mk' _ y (g.inner y))).2 |
| 76 | |
| 77 | theorem metricInChart_apply (g : RiemannianMetric n M) {x y : M} |
| 78 | (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 79 | (v w : EuclideanSpace ℝ (Fin n)) : |
| 80 | metricInChart g x y v w = g.inner y |
| 81 | ((trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x).symmL ℝ y v) |
| 82 | ((trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x).symmL ℝ y w) := by |
| 83 | have hb : y ∈ |
| 84 | (trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x).baseSet := hy |
| 85 | unfold metricInChart |
| 86 | rw [hom_trivializationAt_apply] |
| 87 | rw [inCoordinates_apply_eq₂ hb hb (Set.mem_univ y)] |
| 88 | simp only [Bundle.Trivial.fiberBundle_trivializationAt', |
| 89 | Bundle.Trivial.linearMapAt_trivialization, LinearMap.id_coe, id_eq, |
| 90 | Bundle.Trivialization.symmL_apply _ hb] |
| 91 | |
| 92 | theorem metricInChart_pos (g : RiemannianMetric n M) {x y : M} |
| 93 | (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 94 | (v : EuclideanSpace ℝ (Fin n)) (hv : v ≠ 0) : |
| 95 | 0 < metricInChart g x y v v := by |
| 96 | rw [metricInChart_apply g hy] |
| 97 | apply g.pos |
| 98 | intro hz |
| 99 | apply hv |
| 100 | have h := Bundle.Trivialization.continuousLinearMapAt_symmL (R := ℝ) |
| 101 | (trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x) hy v |
| 102 | rw [hz, map_zero] at h |
| 103 | exact h.symm |
| 104 | |
| 105 | theorem metricInChart_continuousOn (g : RiemannianMetric n M) (x : M) : |
| 106 | ContinuousOn (metricInChart g x) (chartAt (EuclideanSpace ℝ (Fin n)) x).source := by |
| 107 | let e := trivializationAt |
| 108 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 109 | (fun z : M ↦ TangentSpace (𝓡 n) z →L[ℝ] TangentSpace (𝓡 n) z →L[ℝ] ℝ) x |
| 110 | apply continuous_snd.comp_continuousOn (e.continuousOn.comp |
| 111 | g.contMDiff.continuous.continuousOn ?_) |
| 112 | intro y hy |
| 113 | have hb : y ∈ e.baseSet := by |
| 114 | change y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source ∩ |
| 115 | ((chartAt (EuclideanSpace ℝ (Fin n)) x).source ∩ univ) |
| 116 | exact ⟨hy, hy, mem_univ y⟩ |
| 117 | exact (Bundle.Trivialization.mem_source e).mpr hb |
| 118 | |
| 119 | theorem metricInChart_joint_continuousOn {J : Set ℝ} (F : RicciFlow n M J) (x : M) : |
| 120 | ContinuousOn (fun z : ℝ × M ↦ metricInChart (F.metric z.1) x z.2) |
| 121 | (J ×ˢ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) := by |
| 122 | let e := trivializationAt |
| 123 | (EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ) |
| 124 | (fun z : M ↦ TangentSpace (𝓡 n) z →L[ℝ] TangentSpace (𝓡 n) z →L[ℝ] ℝ) x |
| 125 | apply continuous_snd.comp_continuousOn (e.continuousOn.comp |
| 126 | (F.smooth.continuousOn.mono (prod_mono Subset.rfl (subset_univ _))) ?_) |
| 127 | intro z hz |
| 128 | have hb : z.2 ∈ e.baseSet := by |
| 129 | change z.2 ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source ∩ |
| 130 | ((chartAt (EuclideanSpace ℝ (Fin n)) x).source ∩ univ) |
| 131 | exact ⟨hz.2, hz.2, mem_univ _⟩ |
| 132 | exact (Bundle.Trivialization.mem_source e).mpr hb |
| 133 | |
| 134 | /-- The kinetic coefficient for the square-root-time action in a fixed chart. -/ |
| 135 | noncomputable def regularizedChartMetric {J : Set ℝ} (F : RicciFlow n M J) |
| 136 | (T : ℝ) (x : M) (z : ℝ × M) : |
| 137 | EuclideanSpace ℝ (Fin n) →L[ℝ] EuclideanSpace ℝ (Fin n) →L[ℝ] ℝ := |
| 138 | (1 / 2 : ℝ) • metricInChart (F.metric (T - z.1 ^ 2)) x z.2 |
| 139 | |
| 140 | theorem regularizedChartMetric_continuousOn {J : Set ℝ} (F : RicciFlow n M J) |
| 141 | (T : ℝ) (x : M) {a b : ℝ} {K : Set M} |
| 142 | (htime : ∀ s ∈ Icc a b, T - s ^ 2 ∈ J) |
| 143 | (hsrc : K ⊆ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) : |
| 144 | ContinuousOn (regularizedChartMetric F T x) (Icc a b ×ˢ K) := by |
| 145 | let φ : ℝ × M → ℝ × M := fun z ↦ (T - z.1 ^ 2, z.2) |
| 146 | have hφ : ContinuousOn φ (Icc a b ×ˢ K) := by |
| 147 | exact ((continuous_const.sub (continuous_fst.pow 2)).prodMk continuous_snd).continuousOn |
| 148 | have hφmem : MapsTo φ (Icc a b ×ˢ K) |
| 149 | (J ×ˢ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) := by |
| 150 | intro z hz |
| 151 | exact ⟨htime z.1 hz.1, hsrc hz.2⟩ |
| 152 | have hc := (metricInChart_joint_continuousOn F x).comp hφ hφmem |
| 153 | exact (continuousOn_const : ContinuousOn (fun _ : ℝ × M ↦ (1 / 2 : ℝ)) |
| 154 | (Icc a b ×ˢ K)).smul hc |
| 155 | |
| 156 | theorem regularizedChartMetric_nonneg {J : Set ℝ} (F : RicciFlow n M J) |
| 157 | (T : ℝ) (x : M) (s : ℝ) {y : M} |
| 158 | (hy : y ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 159 | (v : EuclideanSpace ℝ (Fin n)) : 0 ≤ regularizedChartMetric F T x (s, y) v v := by |
| 160 | change 0 ≤ (1 / 2 : ℝ) * metricInChart (F.metric (T - s ^ 2)) x y v v |
| 161 | apply mul_nonneg (by norm_num) |
| 162 | by_cases hv : v = 0 |
| 163 | · simp [hv] |
| 164 | · exact (metricInChart_pos _ hy v hv).le |
| 165 | |
| 166 | theorem regularizedPotential_continuousOn {J : Set ℝ} (F : RicciFlow n M J) |
| 167 | (hM04 : RicciFlowCurvatureTheory.{u}) (T : ℝ) {a b : ℝ} {K : Set M} |
| 168 | (htime : ∀ s ∈ Icc a b, T - s ^ 2 ∈ J) : |
| 169 | ContinuousOn (fun z : ℝ × M ↦ |
| 170 | 2 * z.1 ^ 2 * (F.connection (T - z.1 ^ 2)).scalarCurvature z.2) (Icc a b ×ˢ K) := by |
| 171 | let φ : ℝ × M → ℝ × M := fun z ↦ (T - z.1 ^ 2, z.2) |
| 172 | have hφ : ContinuousOn φ (Icc a b ×ˢ K) := by |
| 173 | exact ((continuous_const.sub (continuous_fst.pow 2)).prodMk continuous_snd).continuousOn |
| 174 | have hφmem : MapsTo φ (Icc a b ×ˢ K) (J ×ˢ (Set.univ : Set M)) := by |
| 175 | intro z hz |
| 176 | exact ⟨htime z.1 hz.1, mem_univ _⟩ |
| 177 | have hc := (hM04.scalar_regular n M J F).continuousOn.comp hφ hφmem |
| 178 | exact (continuous_const.mul (continuous_fst.pow 2)).continuousOn.mul hc |
| 179 | |
| 180 | theorem chart_deriv_eq_velocity {α : ℝ → M} {x : M} {s : ℝ} |
| 181 | (hs : α s ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 182 | (hα : MDifferentiableAt (𝓘(ℝ, ℝ)) (𝓡 n) α s) : |
| 183 | deriv ((extChartAt (𝓡 n) x) ∘ α) s = |
| 184 | (trivializationAt (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)) x).continuousLinearMapAt |
| 185 | ℝ (α s) (curveVelocity (n := n) α s) := by |
| 186 | rw [TangentBundle.continuousLinearMapAt_trivializationAt hs] |
| 187 | have h := mfderiv_comp_apply s (mdifferentiableAt_extChartAt hs) hα 1 |
| 188 | rw [mfderiv_eq_fderiv] at h |
| 189 | change (fderiv ℝ ((extChartAt (𝓡 n) x) ∘ α) s) 1 = _ at h |
| 190 | exact h |
| 191 | |
| 192 | theorem metricInChart_deriv (g : RiemannianMetric n M) {α : ℝ → M} {x : M} {s : ℝ} |
| 193 | (hs : α s ∈ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) |
| 194 | (hα : MDifferentiableAt (𝓘(ℝ, ℝ)) (𝓡 n) α s) : |
| 195 | metricInChart g x (α s) (deriv ((extChartAt (𝓡 n) x) ∘ α) s) |
| 196 | (deriv ((extChartAt (𝓡 n) x) ∘ α) s) = referenceSpeedSq g α s := by |
| 197 | rw [metricInChart_apply g hs, chart_deriv_eq_velocity hs hα, |
| 198 | Bundle.Trivialization.symmL_continuousLinearMapAt _ hs] |
| 199 | rfl |
| 200 | |
| 201 | open MeasureTheory Filter |
| 202 | open scoped intervalIntegral |
| 203 | |
| 204 | /-- A fixed compact chart core turns the reference-energy bound into an L2 velocity bound. -/ |
| 205 | theorem chart_velocity_L2_bound (g : RiemannianMetric n M) (x : M) |
| 206 | {K : Set M} (hK : IsCompact K) |
| 207 | (hsrc : K ⊆ (chartAt (EuclideanSpace ℝ (Fin n)) x).source) : |
| 208 | ∃ c : ℝ, 0 < c ∧ ∀ {a b C : ℝ} (hab : a ≤ b) (α : ℝ → M), |
| 209 | ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) 1 α (Ioo a b) → MapsTo α (Icc a b) K → |
| 210 | IntervalIntegrable (referenceSpeedSq g α) volume a b → |
| 211 | (∫ s in a..b, referenceSpeedSq g α s) ≤ C → |
| 212 | ∃ hLp : MemLp (deriv ((extChartAt (𝓡 n) x) ∘ α)) 2 (volume.restrict (Icc a b)), |
| 213 | ‖hLp.toLp (deriv ((extChartAt (𝓡 n) x) ∘ α))‖ ≤ Real.sqrt (c⁻¹ * C) := by |
| 214 | obtain ⟨c, hc, hcoercive⟩ := compact_positive_forms_coercive hK (metricInChart g x) |
| 215 | ((metricInChart_continuousOn g x).mono hsrc) |
| 216 | (fun y hy v hv ↦ metricInChart_pos g (hsrc hy) v hv) |
| 217 | refine ⟨c, hc, ?_⟩ |
| 218 | intro a b C hab α hα hαK hE hbound |
| 219 | let d := deriv ((extChartAt (𝓡 n) x) ∘ α) |
| 220 | have hd : AEStronglyMeasurable d (volume.restrict (Icc a b)) := |
| 221 | aestronglyMeasurable_deriv _ _ |
| 222 | have hq : IntegrableOn (referenceSpeedSq g α) (Icc a b) := |
| 223 | (intervalIntegrable_iff_integrableOn_Icc_of_le hab).mp hE |
| 224 | have hpoint : ∀ᵐ s ∂volume.restrict (Icc a b), |
| 225 | ‖d s‖ ^ 2 ≤ c⁻¹ * referenceSpeedSq g α s := by |
| 226 | rw [← restrict_Ioo_eq_restrict_Icc] |
| 227 | filter_upwards [ae_restrict_mem measurableSet_Ioo] with s hs |
| 228 | have hm := ((hα s hs).contMDiffAt (isOpen_Ioo.mem_nhds hs)).mdifferentiableAt |
| 229 | (by norm_num) |
| 230 | have hb := hcoercive (α s) (hαK (Ioo_subset_Icc_self hs)) (d s) |
| 231 | rw [metricInChart_deriv g (hsrc (hαK (Ioo_subset_Icc_self hs))) hm] at hb |
| 232 | calc |
| 233 | ‖d s‖ ^ 2 = c⁻¹ * (c * ‖d s‖ ^ 2) := by rw [← mul_assoc, inv_mul_cancel₀ hc.ne', one_mul] |
| 234 | _ ≤ c⁻¹ * referenceSpeedSq g α s := mul_le_mul_of_nonneg_left hb (inv_pos.mpr hc).le |
| 235 | have hd2 : Integrable (fun s ↦ ‖d s‖ ^ 2) (volume.restrict (Icc a b)) := by |
| 236 | apply (hq.const_mul c⁻¹).mono' (hd.norm.pow 2) |
| 237 | filter_upwards [hpoint] with s hs |
| 238 | change |‖d s‖ ^ 2| ≤ c⁻¹ * referenceSpeedSq g α s |
| 239 | simpa only [abs_of_nonneg (sq_nonneg ‖d s‖)] using hs |
| 240 | have hLp : MemLp d 2 (volume.restrict (Icc a b)) := |
| 241 | (memLp_two_iff_integrable_sq_norm hd).mpr hd2 |
| 242 | refine ⟨hLp, Real.le_sqrt_of_sq_le ?_⟩ |
| 243 | have hnorm : ‖hLp.toLp d‖ ^ 2 = ∫ s in Icc a b, ‖d s‖ ^ 2 := by |
| 244 | rw [← real_inner_self_eq_norm_sq, L2.inner_def] |
| 245 | apply integral_congr_ae |
| 246 | filter_upwards [hLp.coeFn_toLp] with s hs |
| 247 | rw [hs, real_inner_self_eq_norm_sq] |
| 248 | rw [hnorm] |
| 249 | calc |
| 250 | _ ≤ ∫ s in Icc a b, c⁻¹ * referenceSpeedSq g α s := |
| 251 | integral_mono_ae hd2 (hq.const_mul c⁻¹) hpoint |
| 252 | _ = c⁻¹ * ∫ s in a..b, referenceSpeedSq g α s := by |
| 253 | rw [integral_const_mul, integral_Icc_eq_integral_Ioc, |
| 254 | ← intervalIntegral.integral_of_le hab] |
| 255 | _ ≤ c⁻¹ * C := mul_le_mul_of_nonneg_left hbound (inv_pos.mpr hc).le |
| 256 | |
| 257 | end PoincareMT.LGeometry |