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.Curvature.Calculus |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.Distance.Confinement |
| 3 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.VolumeComparison |
| 4 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.VolumeRatio.RadiusLimit |
| 5 | import PoincareLib.Geometry.Curvature.Operator.RicciBounds |
| 6 | |
| 7 | /-! |
| 8 | # Additive ball-volume comparison along bounded flows |
| 9 | |
| 10 | A terminal ball lies in an earlier ball with an additive radius enlargement. |
| 11 | Its fixed-set volume decreases by the negative scalar-curvature integral. |
| 12 | Reference: Kleiner--Lott, proof of Corollary 44.1, p. 2683; the displayed |
| 13 | fixed-domain derivative there has a sign typo. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter MeasureTheory |
| 20 | open scoped Manifold ContDiff Bundle ENNReal |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.RicciFlow |
| 25 | |
| 26 | theorem terminal_ball_volume_le_enlarged |
| 27 | {m : ℕ} {M : Type u} [TopologicalSpace M] |
| 28 | [MeasurableSpace M] [BorelSpace M] [T3Space M] [SecondCountableTopology M] |
| 29 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) M] |
| 30 | [IsManifold (𝓡 (m + 1)) ∞ M] {J : Set ℝ} |
| 31 | (hC : RicciFlowCurvatureCalculus.{u}) (F : RicciFlow (m + 1) M J) |
| 32 | {a b S r : ℝ} (hm : 0 < m) (hab : a ≤ b) |
| 33 | (hJ : Icc a b ⊆ interior J) |
| 34 | (hcomplete : ∀ t ∈ Icc a b, MetricComplete (F.metric t)) |
| 35 | (hoperator : ∀ t ∈ Icc a b, ∀ x : M, |
| 36 | (F.connection t).NonnegativeCurvatureOperator x) |
| 37 | (hS : 0 ≤ S) |
| 38 | (hscalar : ∀ t ∈ Icc a b, ∀ x : M, (F.connection t).scalarCurvature x ≤ S) |
| 39 | (p : M) (hr : 0 < r) : |
| 40 | ((F.metric b).volumeMeasure ((F.metric b).ball p r)).toReal ≤ |
| 41 | ((F.metric a).volumeMeasure |
| 42 | ((F.metric a).ball p (r + (4 * ((m + 1 : ℕ) : ℝ) + 8 * S) * (b - a) + 1))).toReal := by |
| 43 | have ha : a ∈ Icc a b := ⟨le_rfl, hab⟩ |
| 44 | have hb : b ∈ Icc a b := ⟨hab, le_rfl⟩ |
| 45 | have hD (t : ℝ) : (F.connection t).CurvatureTensorCalculus := |
| 46 | hC.tensor_calculus (m + 1) M (F.metric t) (F.connection t) |
| 47 | have hRic (t : ℝ) (ht : t ∈ Icc a b) (x : M) |
| 48 | (v : TangentSpace (𝓡 (m + 1)) x) : 0 ≤ (F.connection t).ricci x v v := |
| 49 | ((F.connection t).ricci_bounds_of_nonnegative_curvatureOperator |
| 50 | (hD t) x (hoperator t ht x) v).1 |
| 51 | have hupper (t : ℝ) (ht : t ∈ Icc a b) (x : M) |
| 52 | (v : TangentSpace (𝓡 (m + 1)) x) : |
| 53 | (F.connection t).ricci x v v ≤ S * (F.metric t).inner x v v := by |
| 54 | have hv : 0 ≤ (F.metric t).inner x v v := by |
| 55 | by_cases hv : v = 0 |
| 56 | · subst v; simp |
| 57 | · exact ((F.metric t).pos x v hv).le |
| 58 | exact ((F.connection t).ricci_bounds_of_nonnegative_curvatureOperator |
| 59 | (hD t) x (hoperator t ht x) v).2.trans |
| 60 | (mul_le_mul_of_nonneg_right (hscalar t ht x) hv) |
| 61 | have hsub : (F.metric b).ball p r ⊆ |
| 62 | (F.metric a).ball p (r + (4 * ((m + 1 : ℕ) : ℝ) + 8 * S) * (b - a) + 1) := by |
| 63 | intro x hx |
| 64 | have h := F.terminal_closedBall_distance_bound hC hm hab hJ hcomplete hRic p hS |
| 65 | (by norm_num : 0 < (1 : ℝ)) hr.le |
| 66 | (fun t ht x _ v => hupper t ht x v) |
| 67 | (r := r + (4 * ((m + 1 : ℕ) : ℝ) + 8 * S) * (b - a) + 1) |
| 68 | (by simp only [mul_one, div_one]; linarith) a ha x |
| 69 | (show (F.metric b).edist p x ≤ ENNReal.ofReal r from hx.le) |
| 70 | exact h.2 |
| 71 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 (m + 1)) : M → Type _) := |
| 72 | ⟨(F.metric b).toRiemannianMetric⟩ |
| 73 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin (m + 1))) |
| 74 | (TangentSpace (𝓡 (m + 1)) : M → Type _) := |
| 75 | ⟨⟨(F.metric b).inner, (F.metric b).toContinuousRiemannianMetric.continuous, |
| 76 | fun _ _ _ => rfl⟩⟩ |
| 77 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 (m + 1)) M |
| 78 | have hmeas : MeasurableSet ((F.metric b).ball p r) := |
| 79 | (isOpen_lt (continuous_const.edist continuous_id) continuous_const).measurableSet |
| 80 | have hfixed := F.antitoneOn_volumeMeasure_of_scalarCurvature_nonneg hJ |
| 81 | (fun t _ => hD t) hmeas |
| 82 | ((F.metric b).isCompact_closure_ball_of_metricComplete (hcomplete b hb) p r) |
| 83 | subset_closure (fun t ht x _ => Finset.sum_nonneg (fun i _ => hRic t ht x _)) |
| 84 | ha hb hab |
| 85 | exact hfixed.trans (ENNReal.toReal_mono |
| 86 | ((F.metric a).ball_volume_ne_top_of_metricComplete (hcomplete a ha) p _) |
| 87 | (measure_mono hsub)) |
| 88 | |
| 89 | end PoincareMT.RicciFlow |