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.CurveShortening.Comparison.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Local.ConeCorrectedCurves |
| 3 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Local.ConeDiskEnergy |
| 4 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Local.ConeContinuous |
| 5 | |
| 6 | /-! |
| 7 | # Energy control for actual approximating cone disks |
| 8 | |
| 9 | One interpolator and one chart correction produce target-valued C1 disks |
| 10 | converging to a literal continuous cone. Their energies are controlled by |
| 11 | the observed angular column and its strong approximation error. |
| 12 | |
| 13 | Morgan--Tian context: Lemma 19.15 and its annular area-to-energy construction, printed pp. |
| 14 | 447-449. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set Filter MeasureTheory Metric Bundle |
| 21 | open scoped Topology Manifold ContDiff ENNReal |
| 22 | |
| 23 | namespace PoincareMT |
| 24 | |
| 25 | open Proofs.M58 |
| 26 | |
| 27 | /-- The squared L2 norm is bounded by twice the squared approximation error plus the |
| 28 | reference energy. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 29 | theorem m64_integral_norm_sq_le_twice_error |
| 30 | {X E : Type*} [MeasurableSpace X] [NormedAddCommGroup E] |
| 31 | {mu : Measure X} {f v : X → E} (hf : MemLp f 2 mu) (hv : MemLp v 2 mu) : |
| 32 | (∫ x, ‖f x‖ ^ 2 ∂mu) ≤ |
| 33 | 2 * ((∫ x, ‖f x - v x‖ ^ 2 ∂mu) + ∫ x, ‖v x‖ ^ 2 ∂mu) := by |
| 34 | have hfi := (memLp_two_iff_integrable_sq_norm hf.aestronglyMeasurable).mp hf |
| 35 | have hvi := (memLp_two_iff_integrable_sq_norm hv.aestronglyMeasurable).mp hv |
| 36 | have hdi : Integrable (fun x => ‖f x - v x‖ ^ 2) mu := |
| 37 | (memLp_two_iff_integrable_sq_norm |
| 38 | (hf.sub hv).aestronglyMeasurable).mp (hf.sub hv) |
| 39 | rw [← integral_add hdi hvi, ← integral_const_mul] |
| 40 | apply integral_mono hfi ((hdi.add hvi).const_mul 2) |
| 41 | intro x |
| 42 | have hn : ‖f x‖ ≤ ‖f x - v x‖ + ‖v x‖ := norm_le_norm_sub_add _ _ |
| 43 | have hs := (sq_le_sq₀ (norm_nonneg _) (add_nonneg (norm_nonneg _) (norm_nonneg _))).mpr hn |
| 44 | simp only [Pi.add_apply] at * |
| 45 | nlinarith [sq_nonneg (‖f x - v x‖ - ‖v x‖)] |
| 46 | |
| 47 | variable {n m : ℕ} {M : Type*} [TopologicalSpace M] |
| 48 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 49 | |
| 50 | local notation "E" => EuclideanSpace ℝ (Fin m) |
| 51 | local notation "circleMu" => volume.restrict (Icc (0 : ℝ) curvePeriod) |
| 52 | |
| 53 | /-- The actual corrected target circle energy is bounded by the observed derivative error |
| 54 | and reference energy. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 55 | theorem m64_corrected_circle_energy_le |
| 56 | (g : RiemannianMetric n M) (f : ℝ → M) (w v : ℝ → E) |
| 57 | (hf : ContMDiff 𝓘(ℝ, ℝ) (𝓡 n) 1 f) (hw : ContDiff ℝ 1 w) |
| 58 | (hv : MemLp v 2 circleMu) {B : ℝ} (hB : 0 ≤ B) |
| 59 | (hb : ∀ x, g.tangentNorm (f x) (curveVelocity f x) ≤ B * ‖deriv w x‖) : |
| 60 | (∫ x in Icc (0 : ℝ) curvePeriod, |
| 61 | (g.tangentNorm (f x) (curveVelocity f x)) ^ 2) ≤ |
| 62 | 2 * B ^ 2 * ((∫ x in Icc (0 : ℝ) curvePeriod, ‖deriv w x - v x‖ ^ 2) + |
| 63 | ∫ x in Icc (0 : ℝ) curvePeriod, ‖v x‖ ^ 2) := by |
| 64 | have hc := M04.continuous_pathSpeed g hf |
| 65 | have hdc : Continuous (deriv w) := hw.continuous_deriv (by simp) |
| 66 | have hd : MemLp (deriv w) 2 circleMu := by |
| 67 | apply (memLp_two_iff_integrable_sq_norm hdc.aestronglyMeasurable).mpr |
| 68 | exact (hdc.norm.pow 2).integrableOn_Icc |
| 69 | calc |
| 70 | _ ≤ B ^ 2 * ∫ x in Icc (0 : ℝ) curvePeriod, ‖deriv w x‖ ^ 2 := by |
| 71 | rw [← integral_const_mul] |
| 72 | apply setIntegral_mono_on ((hc.pow 2).integrableOn_Icc) |
| 73 | ((hdc.norm.pow 2).integrableOn_Icc.const_mul _) measurableSet_Icc |
| 74 | intro x _ |
| 75 | change (g.tangentNorm (f x) (curveVelocity f x)) ^ 2 ≤ B ^ 2 * ‖deriv w x‖ ^ 2 |
| 76 | have hs := (sq_le_sq₀ (Real.sqrt_nonneg _) (mul_nonneg hB (norm_nonneg _))).mpr |
| 77 | (hb x) |
| 78 | simpa +instances only [mul_pow] using! hs |
| 79 | _ ≤ B ^ 2 * (2 * ((∫ x in Icc (0 : ℝ) curvePeriod, ‖deriv w x - v x‖ ^ 2) + |
| 80 | ∫ x in Icc (0 : ℝ) curvePeriod, ‖v x‖ ^ 2)) := |
| 81 | mul_le_mul_of_nonneg_left (m64_integral_norm_sq_le_twice_error hd hv) (sq_nonneg _) |
| 82 | _ = _ := by ring |
| 83 | |
| 84 | variable [T2Space M] |
| 85 | |
| 86 | /-- Construct actual target-valued classical cones with uniform boundary convergence and |
| 87 | controlled approximation energy. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. |
| 88 | 447-449. -/ |
| 89 | theorem m64ChartReadable_local_cone_approximation_uniform |
| 90 | (g : RiemannianMetric n M) (hcompact : IsCompact (univ : Set M)) |
| 91 | (e : M → E) (he : ContMDiff (𝓡 n) (𝓡 m) 1 e) |
| 92 | (hread : M60.SUChartReadable (n := n) e) (p : M) : |
| 93 | ∃ (U : Set M) (C : ℝ), IsOpen U ∧ p ∈ U ∧ 0 ≤ C ∧ |
| 94 | ∀ (gamma : ℝ → M), Continuous gamma → Function.Periodic gamma curvePeriod → |
| 95 | (∀ x, gamma x ∈ U) → ∀ (w : ℕ → ℝ → E), |
| 96 | (∀ j, ContDiff ℝ 1 (w j)) → (∀ j, Function.Periodic (w j) curvePeriod) → |
| 97 | TendstoUniformlyOn w (e ∘ gamma) atTop (Icc (0 : ℝ) curvePeriod) → |
| 98 | ∀ v : ℝ → E, MemLp v 2 circleMu → |
| 99 | ∃ (k : ℕ) (F : LoopPlane → M) (Fj : ℕ → LoopPlane → M), |
| 100 | Continuous F ∧ (∀ x, F (angularPoint x) = gamma x) ∧ |
| 101 | (∀ z : LoopPlane, ‖z‖ ≤ 1 / 2 → F z = gamma 0) ∧ |
| 102 | (∀ j, ContMDiff (𝓡 2) (𝓡 n) 1 (Fj j)) ∧ |
| 103 | (∀ z, Tendsto (fun j => Fj j z) atTop (𝓝 (F z))) ∧ |
| 104 | TendstoUniformlyOn (fun j x => e (Fj j (angularPoint x))) (e ∘ gamma) atTop |
| 105 | (Icc (0 : ℝ) curvePeriod) ∧ |
| 106 | ∀ j, (∫ z in loopDiskSet, m60EnergyDensity g (Fj j) z) ≤ |
| 107 | C * ((∫ x in Icc (0 : ℝ) curvePeriod, ‖deriv (w (j + k)) x - v x‖ ^ 2) + |
| 108 | ∫ x in Icc (0 : ℝ) curvePeriod, ‖v x‖ ^ 2) := by |
| 109 | let : LocallyCompactSpace M := |
| 110 | ChartedSpace.locallyCompactSpace (EuclideanSpace ℝ (Fin n)) M |
| 111 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 112 | ⟨g.toRiemannianMetric⟩ |
| 113 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 114 | (TangentSpace (𝓡 n) : M → Type _) := |
| 115 | ⟨⟨g.inner, g.contMDiff.continuous, fun _ _ _ => rfl⟩⟩ |
| 116 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 117 | obtain ⟨r, hr, B, _, H, hH, hgeom, _⟩ := m64_exists_local_cone_interpolator g hcompact |
| 118 | obtain ⟨P, _, hprofile⟩ := exists_diskTimeProfile_derivative_bound |
| 119 | let A : ℝ := P ^ 2 / 2 * curvePeriod ^ 2 + 2 * B ^ 2 |
| 120 | have hA : 0 ≤ A := by dsimp only [A]; positivity |
| 121 | let O : Set M := {q | g.edist p q < ENNReal.ofReal (r / 8)} |
| 122 | have hO : IsOpen O := isOpen_lt (continuous_const.edist continuous_id) continuous_const |
| 123 | have hpO : p ∈ O := by |
| 124 | change edist p p < ENNReal.ofReal (r / 8) |
| 125 | rw [edist_self] |
| 126 | exact ENNReal.ofReal_pos.mpr (by linarith) |
| 127 | obtain ⟨U, D, hU, hpU, hD, happ⟩ := |
| 128 | m64ChartReadable_local_circle_approximation_uniform g e he hread p O hO hpO |
| 129 | refine ⟨U, 2 * A * D ^ 2, hU, hpU, by positivity, ?_⟩ |
| 130 | intro gamma hgamma hgammaP hgammaU w hw hwP hlim v hv |
| 131 | obtain ⟨k, f, hfc, hfP, hfpoint, hfO, hfuniform, hspeed⟩ := |
| 132 | happ gamma hgammaP hgammaU w hw hwP hlim |
| 133 | have hfshort (j : ℕ) (x : ℝ) : |
| 134 | g.edist (f j 0) (f j x) ≤ ENNReal.ofReal (r / 2) := by |
| 135 | calc |
| 136 | _ ≤ g.edist (f j 0) p + g.edist p (f j x) := Manifold.riemannianEDist_triangle |
| 137 | _ ≤ ENNReal.ofReal (r / 8) + ENNReal.ofReal (r / 8) := |
| 138 | add_le_add (by |
| 139 | rw [show g.edist (f j 0) p = g.edist p (f j 0) from Manifold.riemannianEDist_comm] |
| 140 | exact (hfO j 0).le) (hfO j x).le |
| 141 | _ ≤ ENNReal.ofReal (r / 2) := by |
| 142 | rw [← ENNReal.ofReal_add (by linarith : 0 ≤ r / 8) (by linarith : 0 ≤ r / 8)] |
| 143 | exact ENNReal.ofReal_le_ofReal (by linarith) |
| 144 | have hgshort (x : ℝ) : g.edist (gamma 0) (gamma x) ≤ ENNReal.ofReal (r / 2) := |
| 145 | le_of_tendsto ((hfpoint 0).edist (hfpoint x)) (Eventually.of_forall fun j => hfshort j x) |
| 146 | have hV : IsOpen {pq : M × M | g.edist pq.1 pq.2 < ENNReal.ofReal r} := |
| 147 | isOpen_lt continuous_edist continuous_const |
| 148 | have hHat (beta : ℝ → M) |
| 149 | (hb : ∀ x, g.edist (beta 0) (beta x) ≤ ENNReal.ofReal (r / 2)) |
| 150 | (s : ℝ) (hs : s ∈ Icc (0 : ℝ) 1) (x : ℝ) : |
| 151 | ContMDiffAt (𝓘(ℝ, ℝ).prod ((𝓡 n).prod (𝓡 n))) (𝓡 n) 1 H |
| 152 | (s, beta 0, beta x) := by |
| 153 | apply (hH.contMDiffAt ((isOpen_Ioo.prod hV).mem_nhds ?_)).of_le (by simp) |
| 154 | exact ⟨⟨by linarith [hs.1], by linarith [hs.2]⟩, |
| 155 | (hb x).trans_lt ((ENNReal.ofReal_lt_ofReal_iff hr).mpr (by linarith))⟩ |
| 156 | have h0 (beta : ℝ → M) |
| 157 | (hb : ∀ x, g.edist (beta 0) (beta x) ≤ ENNReal.ofReal (r / 2)) (x : ℝ) : |
| 158 | H (0, beta 0, beta x) = beta 0 := (hgeom _ _ (hb x)).1 |
| 159 | let F := m64LocalConeDiskMap H (gamma 0) gamma |
| 160 | let Fj := fun j => m64LocalConeDiskMap H (f j 0) (f j) |
| 161 | have hFj (j : ℕ) : ContMDiff (𝓡 2) (𝓡 n) 1 (Fj j) := |
| 162 | m64LocalConeDiskMap_contMDiff H (f j 0) (f j) (hfc j) (hfP j) |
| 163 | (h0 _ (hfshort j)) (hHat _ (hfshort j)) |
| 164 | refine ⟨k, F, Fj, m64LocalConeDiskMap_continuous H (gamma 0) gamma hgamma hgammaP |
| 165 | (h0 gamma hgshort) (fun s hs x => (hHat gamma hgshort s hs x).continuousAt), |
| 166 | m64LocalConeDiskMap_boundary H (gamma 0) gamma hgammaP |
| 167 | (fun x => (hgeom _ _ (hgshort x)).2.1), |
| 168 | fun z hz => m64LocalConeDiskMap_inner H (gamma 0) gamma (h0 gamma hgshort) hz, |
| 169 | hFj, ?_, ?_, ?_⟩ |
| 170 | · intro z |
| 171 | exact m64LocalConeDiskMap_tendsto H (fun j => f j 0) f (gamma 0) gamma |
| 172 | (hfpoint 0) hfpoint (fun s hs x => (hHat gamma hgshort s hs x).continuousAt) z |
| 173 | · have htrace (j : ℕ) (x : ℝ) : Fj j (angularPoint x) = f j x := |
| 174 | m64LocalConeDiskMap_boundary H (f j 0) (f j) (hfP j) |
| 175 | (fun x => (hgeom _ _ (hfshort j x)).2.1) x |
| 176 | simpa only [htrace, Function.comp_def] using hfuniform |
| 177 | · intro j |
| 178 | have hc := m64LocalConeDiskMap_energy_le g H (f j) (hfc j) (hfP j) |
| 179 | (h0 _ (hfshort j)) (hFj j) (hHat _ (hfshort j)) |
| 180 | (fun s hs x => (hgeom _ _ (hfshort j x)).2.2.1 s hs) |
| 181 | (fun s hs x => (hgeom _ _ (hfshort j x)).2.2.2 s hs) hprofile |
| 182 | have hd := m64_corrected_circle_energy_le g (f j) (w (j + k)) v |
| 183 | (hfc j) (hw _) hv hD (hspeed j) |
| 184 | exact hc.trans ((mul_le_mul_of_nonneg_left hd hA).trans_eq (by ring)) |
| 185 | |
| 186 | /-- Construct actual target-valued classical cones converging pointwise with controlled |
| 187 | approximation energy. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 188 | theorem m64ChartReadable_local_cone_approximation |
| 189 | (g : RiemannianMetric n M) (hcompact : IsCompact (univ : Set M)) |
| 190 | (e : M → E) (he : ContMDiff (𝓡 n) (𝓡 m) 1 e) |
| 191 | (hread : M60.SUChartReadable (n := n) e) (p : M) : |
| 192 | ∃ (U : Set M) (C : ℝ), IsOpen U ∧ p ∈ U ∧ 0 ≤ C ∧ |
| 193 | ∀ (gamma : ℝ → M), Continuous gamma → Function.Periodic gamma curvePeriod → |
| 194 | (∀ x, gamma x ∈ U) → ∀ (w : ℕ → ℝ → E), |
| 195 | (∀ j, ContDiff ℝ 1 (w j)) → (∀ j, Function.Periodic (w j) curvePeriod) → |
| 196 | TendstoUniformlyOn w (e ∘ gamma) atTop (Icc (0 : ℝ) curvePeriod) → |
| 197 | ∀ v : ℝ → E, MemLp v 2 circleMu → |
| 198 | ∃ (k : ℕ) (F : LoopPlane → M) (Fj : ℕ → LoopPlane → M), |
| 199 | Continuous F ∧ (∀ x, F (angularPoint x) = gamma x) ∧ |
| 200 | (∀ z : LoopPlane, ‖z‖ ≤ 1 / 2 → F z = gamma 0) ∧ |
| 201 | (∀ j, ContMDiff (𝓡 2) (𝓡 n) 1 (Fj j)) ∧ |
| 202 | (∀ z, Tendsto (fun j => Fj j z) atTop (𝓝 (F z))) ∧ |
| 203 | ∀ j, (∫ z in loopDiskSet, m60EnergyDensity g (Fj j) z) ≤ |
| 204 | C * ((∫ x in Icc (0 : ℝ) curvePeriod, ‖deriv (w (j + k)) x - v x‖ ^ 2) + |
| 205 | ∫ x in Icc (0 : ℝ) curvePeriod, ‖v x‖ ^ 2) := by |
| 206 | obtain ⟨U, C, hU, hp, hC, happ⟩ := |
| 207 | m64ChartReadable_local_cone_approximation_uniform g hcompact e he hread p |
| 208 | refine ⟨U, C, hU, hp, hC, ?_⟩ |
| 209 | intro gamma hc hP hmem w hw hwP hlim v hv |
| 210 | obtain ⟨k, F, Fj, hF, htrace, hinner, hFj, hpoint, -, henergy⟩ := |
| 211 | happ gamma hc hP hmem w hw hwP hlim v hv |
| 212 | exact ⟨k, F, Fj, hF, htrace, hinner, hFj, hpoint, henergy⟩ |
| 213 | |
| 214 | end PoincareMT |