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.Generalized.ReducedGeometry.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.Energy.QuadraticTaylorBound |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.Energy.QuadraticActionComparison |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.Energy.FiniteEnergyStationarity |
| 5 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Calculus.Energy.FiniteEnergyActionComparison |
| 6 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.LGeometry.Minimization.Charts.ChartEulerRegularity |
| 7 | |
| 8 | /-! |
| 9 | # Short-time minimality of a quadratic Euler path |
| 10 | |
| 11 | The local comparison underlying Morgan-Tian Corollary 6.79, |
| 12 | pp. 144-145. Positive metric coefficients, bounded spatial jets and |
| 13 | a bounded reference velocity give strict minimality among all |
| 14 | finite-energy competitors contained in the convex coordinate region. |
| 15 | There is no completeness or existence-of-minimizers premise. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | -- Riesz momentum and the nested metric operators use their actual real normed structures. |
| 20 | set_option backward.isDefEq.respectTransparency false |
| 21 | set_option synthInstance.maxSize 2048 |
| 22 | |
| 23 | open Set Filter MeasureTheory |
| 24 | open scoped NNReal intervalIntegral |
| 25 | |
| 26 | namespace PoincareMT.M14 |
| 27 | |
| 28 | variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] |
| 29 | |
| 30 | private noncomputable local instance dualNormedGroup : NormedAddCommGroup (E →L[ℝ] ℝ) := |
| 31 | ContinuousLinearMap.toNormedAddCommGroup |
| 32 | |
| 33 | private noncomputable local instance dualNormedSpace : NormedSpace ℝ (E →L[ℝ] ℝ) := |
| 34 | ContinuousLinearMap.toNormedSpace |
| 35 | |
| 36 | private noncomputable local instance bilinearNormedGroup : |
| 37 | NormedAddCommGroup (E →L[ℝ] E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedAddCommGroup |
| 38 | |
| 39 | private noncomputable local instance bilinearNormedSpace : |
| 40 | NormedSpace ℝ (E →L[ℝ] E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedSpace |
| 41 | |
| 42 | private noncomputable local instance trilinearNormedGroup : |
| 43 | NormedAddCommGroup (E →L[ℝ] E →L[ℝ] E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedAddCommGroup |
| 44 | |
| 45 | private noncomputable local instance trilinearNormedSpace : |
| 46 | NormedSpace ℝ (E →L[ℝ] E →L[ℝ] E →L[ℝ] ℝ) := ContinuousLinearMap.toNormedSpace |
| 47 | |
| 48 | /-- A quadratic Euler path with bounded velocity is the unique |
| 49 | minimizer among finite-energy competitors in a convex coordinate |
| 50 | region on a sufficiently short interval, the local action argument |
| 51 | for Corollary 6.79, pp. 144-145. -/ |
| 52 | theorem quadratic_short_time_minimality {a b m M : ℝ} (hab : a ≤ b) (hm : 0 < m) |
| 53 | {S : Set E} (hS : Convex ℝ S) (K : ℝ≥0) |
| 54 | (B : ℝ × E → E →L[ℝ] E →L[ℝ] ℝ) (V : ℝ × E → ℝ) |
| 55 | (DB : ℝ × E → E →L[ℝ] E →L[ℝ] E →L[ℝ] ℝ) |
| 56 | (DV : ℝ × E → E →L[ℝ] ℝ) |
| 57 | (hB : ContinuousOn B (Icc a b ×ˢ S)) (hV : ContinuousOn V (Icc a b ×ˢ S)) |
| 58 | (hDB : ContinuousOn DB (Icc a b ×ˢ S)) (hDV : ContinuousOn DV (Icc a b ×ˢ S)) |
| 59 | (hBd : ∀ s ∈ Icc a b, ∀ z ∈ S, |
| 60 | HasFDerivWithinAt (fun q => B (s, q)) (DB (s, z)) S z) |
| 61 | (hVd : ∀ s ∈ Icc a b, ∀ z ∈ S, |
| 62 | HasFDerivWithinAt (fun q => V (s, q)) (DV (s, z)) S z) |
| 63 | (hBLip : ∀ s ∈ Icc a b, LipschitzOnWith K (fun z => B (s, z)) S) |
| 64 | (hDBLip : ∀ s ∈ Icc a b, LipschitzOnWith K (fun z => DB (s, z)) S) |
| 65 | (hDVLip : ∀ s ∈ Icc a b, LipschitzOnWith K (fun z => DV (s, z)) S) |
| 66 | (hsym : ∀ z ∈ Icc a b ×ˢ S, ∀ v w : E, B z v w = B z w v) |
| 67 | (hpos : ∀ z ∈ Icc a b ×ˢ S, ∀ v : E, m * ‖v‖ ^ 2 ≤ B z v v) |
| 68 | (u v : ℝ → E) (hu : ContinuousOn u (Icc a b)) (hv : ContinuousOn v (Icc a b)) |
| 69 | (humem : MapsTo u (Icc a b) S) (hspeed : ∀ s ∈ Icc a b, ‖v s‖ ≤ M) |
| 70 | (hud : ∀ s ∈ Ioo a b, HasDerivAt u (v s) s) |
| 71 | (heuler : ∀ s ∈ Ioo a b, |
| 72 | HasDerivAt (fun r => M08.chartMomentumVector (B (r, u r)) (v r)) |
| 73 | (M08.chartForceVector (DB (s, u s)) (DV (s, u s)) (v s)) s) |
| 74 | (hshort : 0 < m / 4 - |
| 75 | ((K : ℝ) * M ^ 2 / 2 + K + ((K : ℝ) * M) ^ 2 / m) * (b - a) ^ 2) |
| 76 | (z r : ℝ → E) (hz : ContinuousOn z (Icc a b)) (hzmem : MapsTo z (Icc a b) S) |
| 77 | (hzd : ∀ s ∈ Ioo a b, HasDerivAt z (r s) s) |
| 78 | (hr : MemLp r 2 (volume.restrict (Icc a b))) (ha : z a = u a) (hb : z b = u b) |
| 79 | (hg : IntervalIntegrable (fun s => B (s, z s) (r s) (r s) / 2 + V (s, z s)) volume a b) : |
| 80 | (∫ s in a..b, B (s, u s) (v s) (v s) / 2 + V (s, u s)) ≤ |
| 81 | ∫ s in a..b, B (s, z s) (r s) (r s) / 2 + V (s, z s) ∧ |
| 82 | ((∫ s in a..b, B (s, z s) (r s) (r s) / 2 + V (s, z s)) ≤ |
| 83 | ∫ s in a..b, B (s, u s) (v s) (v s) / 2 + V (s, u s) → |
| 84 | EqOn z u (Icc a b)) := by |
| 85 | let w := fun s => z s - u s |
| 86 | let P := fun s => M08.chartMomentumVector (B (s, u s)) (v s) |
| 87 | let Q := fun s => M08.chartForceVector (DB (s, u s)) (DV (s, u s)) (v s) |
| 88 | let L := fun s => inner ℝ (Q s) (w s) + inner ℝ (P s) (deriv w s) |
| 89 | let β := (K : ℝ) * M ^ 2 / 2 + K + ((K : ℝ) * M) ^ 2 / m |
| 90 | have hβ : 0 ≤ β := by dsimp only [β]; positivity |
| 91 | have hgraph := continuousOn_id.prodMk hu |
| 92 | have hmap : MapsTo (fun s => (s, u s)) (Icc a b) (Icc a b ×ˢ S) := |
| 93 | fun _ hs => ⟨hs, humem hs⟩ |
| 94 | have hBc := hB.comp hgraph hmap |
| 95 | have hVc := hV.comp hgraph hmap |
| 96 | have hP : ContinuousOn P (Icc a b) := |
| 97 | (InnerProductSpace.toDual ℝ E).symm.continuous.comp_continuousOn (hBc.clm_apply hv) |
| 98 | have hQ : ContinuousOn Q (Icc a b) := |
| 99 | M08.chartForceVector_continuousOn (hDB.comp hgraph hmap) (hDV.comp hgraph hmap) hv |
| 100 | have hw : ContinuousOn w (Icc a b) := hz.sub hu |
| 101 | have hwd (s : ℝ) (hs : s ∈ Ioo a b) : HasDerivAt w (r s - v s) s := |
| 102 | (hzd s hs).sub (hud s hs) |
| 103 | have hwdiff : DifferentiableOn ℝ w (Ioo a b) := |
| 104 | fun s hs => (hwd s hs).differentiableAt.differentiableWithinAt |
| 105 | have hvLp : MemLp v 2 (volume.restrict (Icc a b)) := by |
| 106 | apply (memLp_two_iff_integrable_sq_norm (hv.aestronglyMeasurable measurableSet_Icc)).mpr |
| 107 | have hi : IntervalIntegrable (fun s => ‖v s‖ ^ 2) volume a b := |
| 108 | ((continuous_pow 2).comp_continuousOn hv.norm).intervalIntegrable_of_Icc hab |
| 109 | exact (intervalIntegrable_iff_integrableOn_Icc_of_le hab).mp hi |
| 110 | have hd : MemLp (deriv w) 2 (volume.restrict (Icc a b)) := by |
| 111 | have heq : (r - v) =ᵐ[volume.restrict (Icc a b)] deriv w := by |
| 112 | rw [← Measure.restrict_congr_set Ioo_ae_eq_Icc] |
| 113 | filter_upwards [ae_restrict_mem measurableSet_Ioo] with s hs |
| 114 | exact (hwd s hs).deriv.symm |
| 115 | exact (memLp_congr_ae heq).mp (hr.sub hvLp) |
| 116 | have hwa : w a = 0 := sub_eq_zero.mpr ha |
| 117 | have hwb : w b = 0 := sub_eq_zero.mpr hb |
| 118 | obtain ⟨hL, hstationary⟩ := |
| 119 | integral_momentum_variation_eq_zero hab P Q w hP hQ hw heuler hwdiff hd hwa hwb |
| 120 | have hf : IntervalIntegrable (fun s => B (s, u s) (v s) (v s) / 2 + V (s, u s)) |
| 121 | volume a b := |
| 122 | ((((hBc.clm_apply hv).clm_apply hv).div_const 2).add hVc).intervalIntegrable_of_Icc hab |
| 123 | have hlinear (s : ℝ) : L s = DB (s, u s) (w s) (v s) (v s) / 2 + |
| 124 | B (s, u s) (v s) (deriv w s) + DV (s, u s) (w s) := by |
| 125 | dsimp only [L, P, Q] |
| 126 | rw [real_inner_comm _ (M08.chartForceVector _ _ _), M08.chartForceVector_inner, |
| 127 | real_inner_comm _ (M08.chartMomentumVector _ _), M08.chartMomentumVector_inner] |
| 128 | ring |
| 129 | have hpoint (s : ℝ) (hs : s ∈ Ioo a b) : |
| 130 | m / 4 * ‖deriv w s‖ ^ 2 - β * ‖w s‖ ^ 2 ≤ |
| 131 | (B (s, z s) (r s) (r s) / 2 + V (s, z s)) - |
| 132 | (B (s, u s) (v s) (v s) / 2 + V (s, u s)) - L s := by |
| 133 | have hsC := Ioo_subset_Icc_self hs |
| 134 | have hremB := norm_sub_sub_linear_le_sq hS (hBd s hsC) (hDBLip s hsC) |
| 135 | (humem hsC) (hzmem hsC) |
| 136 | have hremV := norm_sub_sub_linear_le_sq hS (hVd s hsC) (hDVLip s hsC) |
| 137 | (humem hsC) (hzmem hsC) |
| 138 | have hpot : -((K : ℝ) * ‖w s‖ ^ 2) ≤ |
| 139 | V (s, z s) - V (s, u s) - DV (s, u s) (w s) := |
| 140 | (abs_le.mp (by simpa only [Real.norm_eq_abs] using hremV)).1 |
| 141 | have h := quadratic_action_remainder_lower_bound |
| 142 | (B (s, u s)) (B (s, z s)) (DB (s, u s) (w s)) (v s) (r s - v s) (w s) |
| 143 | (V (s, u s)) (V (s, z s)) (DV (s, u s) (w s)) m K M hm K.coe_nonneg |
| 144 | (hspeed s hsC) (hsym _ ⟨hsC, hzmem hsC⟩ _ _) (hpos _ ⟨hsC, hzmem hsC⟩ _) |
| 145 | ((hBLip s hsC).norm_sub_le (hzmem hsC) (humem hsC)) hremB hpot |
| 146 | rw [hlinear, (hwd s hs).deriv] |
| 147 | rw [show v s + (r s - v s) = r s by abel] at h |
| 148 | exact h |
| 149 | have hgap := finite_energy_action_gap hab hβ hf hg hL hstationary hw hwdiff hd hwb hpoint |
| 150 | have he : 0 ≤ ∫ s in a..b, ‖deriv w s‖ ^ 2 := |
| 151 | intervalIntegral.integral_nonneg hab (fun s _ => sq_nonneg ‖deriv w s‖) |
| 152 | refine ⟨?_, ?_⟩ |
| 153 | · have hnonneg := mul_nonneg hshort.le he |
| 154 | exact sub_nonneg.mp (hnonneg.trans hgap) |
| 155 | · intro haction s hs |
| 156 | have hwzero := finite_energy_action_eq_of_gap_nonpos hab hβ hshort hf hg hL |
| 157 | hstationary hw hwdiff hd hwb hpoint haction s hs |
| 158 | exact sub_eq_zero.mp hwzero |
| 159 | |
| 160 | end PoincareMT.M14 |