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.Harnack.Noncompact.CurvatureControl.VolumeComparison |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.MetricMonotonicity |
| 3 | import PoincareLib.Geometry.Riemannian.Distance.CompleteBalls |
| 4 | import PoincareLib.Geometry.Curvature.Operator.RicciBounds |
| 5 | |
| 6 | /-! |
| 7 | # Lower volume bounds for expanding Ricci-flow balls |
| 8 | |
| 9 | Nonnegative Ricci curvature puts the initial ball inside each later ball. |
| 10 | The fixed-set volume evolution therefore converts a uniform scalar-integral |
| 11 | bound on the evolving balls into a linear lower volume bound. This is the |
| 12 | argument of Cabezas-Rivas--Wilking, Proposition 4.3, equations (4.2)-(4.3), |
| 13 | and Corollary 4.4, p. 3161. The scalar-integral estimate remains an explicit |
| 14 | input; it is supplied in that source by Petrunin's Theorem 4.2, p. 3160. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open Set MeasureTheory Filter |
| 21 | open scoped Manifold ContDiff Bundle ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT |
| 26 | |
| 27 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [MeasurableSpace M] [BorelSpace M] [T3Space M] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 30 | |
| 31 | omit [MeasurableSpace M] [BorelSpace M] in |
| 32 | private lemma isOpen_metric_ball (g : RiemannianMetric n M) (p : M) (r : ℝ) : |
| 33 | IsOpen (g.ball p r) := by |
| 34 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 35 | ⟨g.toRiemannianMetric⟩ |
| 36 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) |
| 37 | (TangentSpace (𝓡 n) : M → Type _) := |
| 38 | ⟨⟨g.inner, g.toContinuousRiemannianMetric.continuous, fun _ _ _ ↦ rfl⟩⟩ |
| 39 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 n) M |
| 40 | have heq : g.ball p r = Metric.eball p (ENNReal.ofReal r) := by |
| 41 | ext x |
| 42 | change g.edist p x < ENNReal.ofReal r ↔ edist x p < ENNReal.ofReal r |
| 43 | rw [edist_comm] |
| 44 | rfl |
| 45 | rw [heq] |
| 46 | exact Metric.isOpen_eball |
| 47 | |
| 48 | private lemma volumeMeasure_ball_ne_top (g : RiemannianMetric n M) |
| 49 | (hc : MetricComplete g) (p : M) (r : ℝ) : |
| 50 | g.volumeMeasure (g.ball p r) ≠ ⊤ := by |
| 51 | have hs : g.ball p r ⊆ {q | g.edist p q ≤ ENNReal.ofReal r} := by |
| 52 | intro q hq |
| 53 | exact (show g.edist p q < ENNReal.ofReal r from hq).le |
| 54 | exact (lt_of_le_of_lt (measure_mono hs) |
| 55 | (g.volumeMeasure_lt_top_of_isCompact |
| 56 | (g.isCompact_closedBall_of_metricComplete hc p r))).ne |
| 57 | |
| 58 | /-- An upper bound on scalar integrals over moving balls controls their volume |
| 59 | loss without any uniform-in-time curvature bound. -/ |
| 60 | theorem RicciFlow.ball_volume_lower_bound_of_integral_scalarCurvature_le |
| 61 | {J : Set ℝ} (F : RicciFlow n M J) {a b P : ℝ} (hab : a ≤ b) |
| 62 | (hJ : Icc a b ⊆ interior J) |
| 63 | (hD : ∀ t ∈ Icc a b, (F.connection t).CurvatureTensorCalculus) |
| 64 | (hcomplete : ∀ t ∈ Icc a b, MetricComplete (F.metric t)) |
| 65 | (hRic : ∀ t ∈ Icc a b, ∀ x : M, ∀ v : TangentSpace (𝓡 n) x, |
| 66 | 0 ≤ (F.connection t).ricci x v v) |
| 67 | (p : M) (r : ℝ) |
| 68 | (hP : ∀ t ∈ Ioo a b, |
| 69 | (∫ y in (F.metric t).ball p r, (F.connection t).scalarCurvature y |
| 70 | ∂(F.metric t).volumeMeasure) ≤ P) : |
| 71 | ((F.metric a).volumeMeasure ((F.metric a).ball p r)).toReal - P * (b - a) ≤ |
| 72 | ((F.metric b).volumeMeasure ((F.metric b).ball p r)).toReal := by |
| 73 | have ha : a ∈ Icc a b := ⟨le_rfl, hab⟩ |
| 74 | have hb : b ∈ Icc a b := ⟨hab, le_rfl⟩ |
| 75 | have hball (t : ℝ) (ht : t ∈ Icc a b) : |
| 76 | (F.metric a).ball p r ⊆ (F.metric t).ball p r := |
| 77 | F.ball_subset_ball_of_ricci_nonneg hJ p r ha ht ht.1 |
| 78 | (fun s hs x _ v => hRic s hs x v) |
| 79 | have hR (t : ℝ) (ht : t ∈ Icc a b) (x : M) : |
| 80 | 0 ≤ (F.connection t).scalarCurvature x := |
| 81 | Finset.sum_nonneg (fun i _ => hRic t ht x _) |
| 82 | have hfixed := F.volumeMeasure_lower_bound_of_integral_scalarCurvature_le hab hJ hD |
| 83 | (isOpen_metric_ball (F.metric a) p r).measurableSet |
| 84 | ((F.metric a).isCompact_closedBall_of_metricComplete (hcomplete a ha) p r) |
| 85 | (fun q hx => (show (F.metric a).edist p q < ENNReal.ofReal r from hx).le) |
| 86 | (P := P) (by |
| 87 | intro t ht |
| 88 | have ht' : t ∈ Icc a b := Ioo_subset_Icc_self ht |
| 89 | have hi : IntegrableOn (F.connection t).scalarCurvature |
| 90 | ((F.metric t).ball p r) (F.metric t).volumeMeasure := |
| 91 | ((hD t ht').contMDiff_scalarCurvature.continuous.continuousOn.integrableOn_compact |
| 92 | ((F.metric t).isCompact_closedBall_of_metricComplete (hcomplete t ht') p r)).mono_set |
| 93 | (show (F.metric t).ball p r ⊆ |
| 94 | {q | (F.metric t).edist p q ≤ ENNReal.ofReal r} from |
| 95 | fun q hx => (show (F.metric t).edist p q < ENNReal.ofReal r from hx).le) |
| 96 | exact (setIntegral_mono_set hi (Eventually.of_forall (hR t ht')) |
| 97 | (hball t ht').eventuallyLE).trans (hP t ht)) |
| 98 | exact hfixed.trans (ENNReal.toReal_mono |
| 99 | (volumeMeasure_ball_ne_top (F.metric b) (hcomplete b hb) p r) |
| 100 | (measure_mono (hball b hb))) |
| 101 | |
| 102 | /-- The same moving-ball estimate under the curvature-operator hypothesis |
| 103 | of the frozen finite Harnack theorem. -/ |
| 104 | theorem RicciFlow.ball_volume_lower_bound_of_nonnegative_curvatureOperator |
| 105 | {J : Set ℝ} (F : RicciFlow n M J) {a b P : ℝ} (hab : a ≤ b) |
| 106 | (hJ : Icc a b ⊆ interior J) |
| 107 | (hD : ∀ t ∈ Icc a b, (F.connection t).CurvatureTensorCalculus) |
| 108 | (hcomplete : ∀ t ∈ Icc a b, MetricComplete (F.metric t)) |
| 109 | (hoperator : ∀ t ∈ Icc a b, ∀ x : M, |
| 110 | (F.connection t).NonnegativeCurvatureOperator x) |
| 111 | (p : M) (r : ℝ) |
| 112 | (hP : ∀ t ∈ Ioo a b, |
| 113 | (∫ y in (F.metric t).ball p r, (F.connection t).scalarCurvature y |
| 114 | ∂(F.metric t).volumeMeasure) ≤ P) : |
| 115 | ((F.metric a).volumeMeasure ((F.metric a).ball p r)).toReal - P * (b - a) ≤ |
| 116 | ((F.metric b).volumeMeasure ((F.metric b).ball p r)).toReal := |
| 117 | F.ball_volume_lower_bound_of_integral_scalarCurvature_le hab hJ hD hcomplete |
| 118 | (fun t ht x v => ((F.connection t).ricci_bounds_of_nonnegative_curvatureOperator |
| 119 | (hD t ht) x (hoperator t ht x) v).1) p r hP |
| 120 | |
| 121 | end PoincareMT |