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.MetricComparison |
| 2 | import PoincareLib.Geometry.Riemannian.Curvature.NormBounds |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.Convergence.Volume.MeasureComparison |
| 4 | import PoincareLib.Geometry.Riemannian.Compactness.IntrinsicMetric |
| 5 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.MetricMonotonicity |
| 6 | |
| 7 | /-! |
| 8 | # Exact noncollapse at an included terminal time |
| 9 | |
| 10 | Smaller earlier parabolic balls lie in a terminal parabolic ball. Local |
| 11 | metric comparison controls their volumes by the terminal volume. Taking |
| 12 | the time and then radius limits preserves the exact interior kappa constant |
| 13 | without assuming completeness of the terminal slice. |
| 14 | |
| 15 | Reference: Morgan--Tian, Theorem 9.64, pp. 225-229. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | set_option maxHeartbeats 800000 |
| 21 | |
| 22 | open Set Filter MeasureTheory |
| 23 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 24 | |
| 25 | namespace PoincareMT.RicciFlow |
| 26 | |
| 27 | section Generic |
| 28 | |
| 29 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 31 | |
| 32 | /-- Nonnegative Ricci curvature compares earlier tangent norms with the |
| 33 | included terminal norm. The equation is differentiated only at interior times. -/ |
| 34 | theorem terminal_tangentNorm_le_of_ricci_nonneg |
| 35 | (F : RicciFlow n M (Iic 0)) {s : ℝ} (hs : s ≤ 0) |
| 36 | (x : M) (v : TangentSpace (𝓡 n) x) |
| 37 | (hRic : ∀ t ∈ Icc s 0, 0 ≤ (F.connection t).ricci x v v) : |
| 38 | (F.metric 0).tangentNorm x v ≤ (F.metric s).tangentNorm x v := by |
| 39 | have hd (t : ℝ) (ht : t ∈ interior (Icc s 0)) : |
| 40 | HasDerivAt (fun u => (F.metric u).inner x v v) |
| 41 | (-2 * (F.connection t).ricci x v v) t := by |
| 42 | have ht0 : t < 0 := (show t ∈ Ioo s 0 from by simpa only [interior_Icc] using ht).2 |
| 43 | exact (F.equation t ht0.le x v v).hasDerivAt (Iic_mem_nhds ht0) |
| 44 | have hanti : AntitoneOn (fun t => (F.metric t).inner x v v) (Icc s 0) := by |
| 45 | apply antitoneOn_of_deriv_nonpos (convex_Icc s 0) |
| 46 | · intro t ht |
| 47 | exact (F.equation t ht.2 x v v).continuousWithinAt.mono (fun u hu => hu.2) |
| 48 | · intro t ht |
| 49 | exact (hd t ht).differentiableAt.differentiableWithinAt |
| 50 | · intro t ht |
| 51 | rw [(hd t ht).deriv] |
| 52 | exact mul_nonpos_of_nonpos_of_nonneg (by norm_num) (hRic t (interior_subset ht)) |
| 53 | exact Real.sqrt_le_sqrt (hanti ⟨le_rfl, hs⟩ ⟨hs, le_rfl⟩ hs) |
| 54 | |
| 55 | /-- Earlier balls lie in terminal balls of the same radius under |
| 56 | nonnegative Ricci curvature, including the endpoint of the flow interval. -/ |
| 57 | theorem ball_subset_terminal_ball_of_ricci_nonneg |
| 58 | (F : RicciFlow n M (Iic 0)) {s : ℝ} (hs : s ≤ 0) (p : M) (r : ℝ) |
| 59 | (hRic : ∀ t ∈ Icc s 0, ∀ x ∈ (F.metric s).ball p r, |
| 60 | ∀ v : TangentSpace (𝓡 n) x, 0 ≤ (F.connection t).ricci x v v) : |
| 61 | (F.metric s).ball p r ⊆ (F.metric 0).ball p r := by |
| 62 | simpa only [one_mul] using RiemannianMetric.ball_subset_ball_of_tangentNorm_le |
| 63 | (F.metric s) (F.metric 0) p r 1 zero_lt_one (by |
| 64 | intro x hx v |
| 65 | simpa only [one_mul] using F.terminal_tangentNorm_le_of_ricci_nonneg hs x v |
| 66 | (fun t ht => hRic t ht x hx v)) |
| 67 | |
| 68 | end Generic |
| 69 | |
| 70 | section ThreeDimensional |
| 71 | |
| 72 | variable {M : Type} [TopologicalSpace M] |
| 73 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 74 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 75 | [SecondCountableTopology M] [PreconnectedSpace M] |
| 76 | |
| 77 | /-- A local parabolic bound compares an earlier smaller ball's volume with |
| 78 | the fixed terminal ball. This statement applies directly to a closed flow. -/ |
| 79 | theorem earlier_ball_volume_le_exp_mul_terminal_ball |
| 80 | (F : RicciFlow 3 M (Iic 0)) (p : M) {s B ρ r : ℝ} |
| 81 | (hs : s ≤ 0) (hρr : ρ ≤ r) |
| 82 | (hRic : ∀ t ∈ Icc s 0, ∀ x : M, ∀ v : TangentSpace (𝓡 3) x, |
| 83 | 0 ≤ (F.connection t).ricci x v v) |
| 84 | (hbound : ∀ t ∈ Icc s 0, ∀ x ∈ (F.metric 0).ball p r, |
| 85 | (F.connection t).curvatureTensorNorm x ≤ B) : |
| 86 | (F.metric s).volumeMeasure ((F.metric s).ball p ρ) ≤ |
| 87 | ENNReal.ofReal (Real.exp (27 * B * (-s))) ^ 3 * |
| 88 | (F.metric 0).volumeMeasure ((F.metric 0).ball p r) := by |
| 89 | let U := (F.metric 0).ball p r |
| 90 | let c := Real.exp (27 * B * (-s)) |
| 91 | have hc : 0 < c := Real.exp_pos _ |
| 92 | have hzero : (0 : ℝ) ∈ Icc s 0 := ⟨hs, le_rfl⟩ |
| 93 | have hearly : s ∈ Icc s 0 := ⟨le_rfl, hs⟩ |
| 94 | have habsRic (t : ℝ) (ht : t ∈ Icc s 0) (x : M) (hx : x ∈ U) |
| 95 | (v : TangentSpace (𝓡 3) x) : |
| 96 | |(F.connection t).ricci x v v| ≤ (27 * B) * (F.metric t).inner x v v := by |
| 97 | have h := (F.connection t).abs_ricci_quadratic_le_curvatureTensorNorm x v |
| 98 | have hv : 0 ≤ (F.metric t).inner x v v := by |
| 99 | by_cases hv : v = 0 |
| 100 | · subst v; simp |
| 101 | · exact ((F.metric t).pos x v hv).le |
| 102 | have hdim : Module.finrank ℝ (TangentSpace (𝓡 3) x) = 3 := finrank_euclideanSpace_fin |
| 103 | simp only [Fintype.card_fin, hdim] at h |
| 104 | norm_num at h |
| 105 | exact h.trans (mul_le_mul_of_nonneg_right |
| 106 | (mul_le_mul_of_nonneg_left (hbound t ht x hx) (by norm_num)) hv) |
| 107 | have hbackward (x : M) (hx : x ∈ U) (v : TangentSpace (𝓡 3) x) : |
| 108 | (F.metric s).tangentNorm x v ≤ c * (F.metric 0).tangentNorm x v := by |
| 109 | simpa only [sub_zero, abs_of_nonpos hs] using |
| 110 | F.tangentNorm_le_exp_of_ricci_bound (convex_Icc s 0) (fun _ ht => ht.2) |
| 111 | x v (27 * B) (fun t ht => habsRic t ht x hx v) hzero hearly |
| 112 | have hU : IsOpen U := by |
| 113 | let := (F.metric 0).toMetricSpace |
| 114 | rw [show U = Metric.ball p r from ((F.metric 0).toMetricSpace_ball p r).symm] |
| 115 | exact Metric.isOpen_ball |
| 116 | have hvol := (F.metric 0).volumeMeasure_image_le_of_tangentNorm_le |
| 117 | (F.metric s) (OpenPartialHomeomorph.refl M) hU (subset_univ U) |
| 118 | contMDiffOn_id hc (by |
| 119 | intro x hx v |
| 120 | change (F.metric s).tangentNorm x (mfderiv (𝓡 3) (𝓡 3) id x v) ≤ _ |
| 121 | rw [mfderiv_id] |
| 122 | exact hbackward x hx v) |
| 123 | hU.measurableSet (Subset.refl U) |
| 124 | change (F.metric s).volumeMeasure (id '' U) ≤ _ at hvol |
| 125 | rw [image_id] at hvol |
| 126 | apply (measure_mono ?_).trans hvol |
| 127 | intro x hx |
| 128 | exact (F.ball_subset_terminal_ball_of_ricci_nonneg hs p ρ |
| 129 | (fun t ht y _ v => hRic t ht y v) hx).trans_le (ENNReal.ofReal_le_ofReal hρr) |
| 130 | |
| 131 | /-- Exact interior parabolic noncollapse persists at the included terminal |
| 132 | time. The proof takes limits of earlier smaller balls and uses no terminal |
| 133 | completeness assumption. -/ |
| 134 | theorem terminal_ball_volume_lower_bound_of_interior_noncollapse |
| 135 | (F : RicciFlow 3 M (Iic 0)) (κ : ℝ) |
| 136 | (hRic : ∀ t : ℝ, t ≤ 0 → ∀ x : M, ∀ v : TangentSpace (𝓡 3) x, |
| 137 | 0 ≤ (F.connection t).ricci x v v) |
| 138 | (hinterior : ∀ t : ℝ, t < 0 → ∀ p : M, ∀ r : ℝ, 0 < r → |
| 139 | (∀ s ∈ Ioc (t - r ^ 2) t, ∀ x ∈ (F.metric t).ball p r, |
| 140 | |(F.connection s).curvatureTensorNorm x| ≤ r⁻¹ ^ 2) → |
| 141 | ENNReal.ofReal (κ * r ^ 3) ≤ (F.metric t).volumeMeasure ((F.metric t).ball p r)) |
| 142 | (p : M) {r : ℝ} (hr : 0 < r) |
| 143 | (hcurv : ∀ s ∈ Ioc (-(r ^ 2)) 0, ∀ x ∈ (F.metric 0).ball p r, |
| 144 | |(F.connection s).curvatureTensorNorm x| ≤ r⁻¹ ^ 2) : |
| 145 | ENNReal.ofReal (κ * r ^ 3) ≤ (F.metric 0).volumeMeasure ((F.metric 0).ball p r) := by |
| 146 | have hsmall (ρ : ℝ) (hρ : 0 < ρ) (hρr : ρ < r) : |
| 147 | ENNReal.ofReal (κ * ρ ^ 3) ≤ (F.metric 0).volumeMeasure ((F.metric 0).ball p r) := by |
| 148 | have hleft : ρ ^ 2 - r ^ 2 < 0 := by nlinarith |
| 149 | have hradii : r⁻¹ ^ 2 ≤ ρ⁻¹ ^ 2 := by |
| 150 | have hi := (inv_lt_inv₀ hr hρ).mpr hρr |
| 151 | nlinarith [inv_pos.mpr hρ, inv_pos.mpr hr] |
| 152 | have hearly (s : ℝ) (hs : s ∈ Ioo (ρ ^ 2 - r ^ 2) 0) : |
| 153 | ENNReal.ofReal (κ * ρ ^ 3) ≤ |
| 154 | ENNReal.ofReal (Real.exp (27 * r⁻¹ ^ 2 * (-s))) ^ 3 * |
| 155 | (F.metric 0).volumeMeasure ((F.metric 0).ball p r) := by |
| 156 | have hball : (F.metric s).ball p ρ ⊆ (F.metric 0).ball p r := by |
| 157 | intro x hx |
| 158 | exact (F.ball_subset_terminal_ball_of_ricci_nonneg hs.2.le p ρ |
| 159 | (fun t ht y _ v => hRic t ht.2 y v) hx).trans_le |
| 160 | (ENNReal.ofReal_le_ofReal hρr.le) |
| 161 | have hnoncollapse := hinterior s hs.2 p ρ hρ (by |
| 162 | intro t ht x hx |
| 163 | exact (hcurv t ⟨by linarith [ht.1, hs.1], ht.2.trans hs.2.le⟩ x |
| 164 | (hball hx)).trans hradii) |
| 165 | apply hnoncollapse.trans |
| 166 | exact F.earlier_ball_volume_le_exp_mul_terminal_ball p hs.2.le hρr.le |
| 167 | (fun t ht => hRic t ht.2) (by |
| 168 | intro t ht x hx |
| 169 | exact (le_abs_self _).trans (hcurv t ⟨by nlinarith [ht.1, hs.1], ht.2⟩ x hx)) |
| 170 | have hcoeff : Tendsto (fun s : ℝ => |
| 171 | ENNReal.ofReal (Real.exp (27 * r⁻¹ ^ 2 * (-s))) ^ 3) |
| 172 | (𝓝[<] 0) (𝓝 (1 : ℝ≥0∞)) := by |
| 173 | have hcont : Continuous (fun s : ℝ => |
| 174 | ENNReal.ofReal (Real.exp (27 * r⁻¹ ^ 2 * (-s)) ^ 3)) := |
| 175 | ENNReal.continuous_ofReal.comp |
| 176 | ((Real.continuous_exp.comp (continuous_const.mul continuous_id.neg)).pow 3) |
| 177 | have h : Tendsto (fun s : ℝ => |
| 178 | ENNReal.ofReal (Real.exp (27 * r⁻¹ ^ 2 * (-s)) ^ 3)) |
| 179 | (𝓝[<] 0) (𝓝 (1 : ℝ≥0∞)) := by |
| 180 | simpa using (hcont.continuousAt (x := (0 : ℝ))).tendsto.mono_left |
| 181 | (show 𝓝[<] (0 : ℝ) ≤ 𝓝 0 from nhdsWithin_le_nhds) |
| 182 | simpa only [ENNReal.ofReal_pow (Real.exp_nonneg _)] using h |
| 183 | have hlim := ENNReal.Tendsto.mul_const |
| 184 | (b := (F.metric 0).volumeMeasure ((F.metric 0).ball p r)) hcoeff (Or.inl one_ne_zero) |
| 185 | simp only [one_mul] at hlim |
| 186 | apply ge_of_tendsto hlim |
| 187 | filter_upwards [self_mem_nhdsWithin, |
| 188 | (eventually_gt_nhds hleft).filter_mono nhdsWithin_le_nhds] with s hs hsl |
| 189 | exact hearly s ⟨hsl, hs⟩ |
| 190 | have hcoeff : Tendsto (fun ρ : ℝ => ENNReal.ofReal (κ * ρ ^ 3)) |
| 191 | (𝓝[<] r) (𝓝 (ENNReal.ofReal (κ * r ^ 3))) := by |
| 192 | have hcont : Continuous (fun ρ : ℝ => ENNReal.ofReal (κ * ρ ^ 3)) := |
| 193 | ENNReal.continuous_ofReal.comp (continuous_const.mul (continuous_id.pow 3)) |
| 194 | exact hcont.continuousAt.tendsto.mono_left nhdsWithin_le_nhds |
| 195 | apply le_of_tendsto hcoeff |
| 196 | filter_upwards [self_mem_nhdsWithin, |
| 197 | (eventually_gt_nhds hr).filter_mono nhdsWithin_le_nhds] with ρ hρr hρ |
| 198 | exact hsmall ρ hρ hρr |
| 199 | |
| 200 | end ThreeDimensional |
| 201 | end PoincareMT.RicciFlow |