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.MetricMonotonicity |
| 4 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.VolumeComparison |
| 5 | import PoincareLib.Geometry.RicciFlow.Harnack.Noncompact.CurvatureControl.VolumeRatio.RadiusLimit |
| 6 | import PoincareLib.Geometry.Curvature.Operator.RicciBounds |
| 7 | |
| 8 | /-! |
| 9 | # Volume transfer inside a fixed terminal cylinder |
| 10 | |
| 11 | The curvature bound is needed only on one terminal ball. Nonnegative Ricci |
| 12 | curvature confines all the moving balls used by backward distance comparison |
| 13 | to this ball. Fixed-set volume monotonicity then transfers terminal volume |
| 14 | to an earlier slice. |
| 15 | Reference: Kleiner--Lott, Corollary 44.1, pp. 2682--2683, and Corollary |
| 16 | 45.1(a), pp. 2683--2685. |
| 17 | -/ |
| 18 | |
| 19 | set_option autoImplicit false |
| 20 | set_option backward.isDefEq.respectTransparency false |
| 21 | |
| 22 | open Set MeasureTheory |
| 23 | open scoped Manifold ContDiff Bundle ENNReal |
| 24 | |
| 25 | universe u |
| 26 | |
| 27 | namespace PoincareMT.RicciFlow |
| 28 | |
| 29 | theorem terminal_ball_volume_le_earlier_ball_of_cylinder |
| 30 | {m : ℕ} {M : Type u} [TopologicalSpace M] |
| 31 | [MeasurableSpace M] [BorelSpace M] [T3Space M] [SecondCountableTopology M] |
| 32 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) M] |
| 33 | [IsManifold (𝓡 (m + 1)) ∞ M] {J : Set ℝ} |
| 34 | (hC : RicciFlowCurvatureCalculus.{u}) (F : RicciFlow (m + 1) M J) |
| 35 | {a b S r ρ L : ℝ} (hm : 0 < m) (hab : a ≤ b) |
| 36 | (hJ : Icc a b ⊆ interior J) |
| 37 | (hcomplete : ∀ t ∈ Icc a b, MetricComplete (F.metric t)) |
| 38 | (hoperator : ∀ t ∈ Icc a b, ∀ x : M, |
| 39 | (F.connection t).NonnegativeCurvatureOperator x) |
| 40 | (hS : 0 ≤ S) (p : M) |
| 41 | (hscalar : ∀ t ∈ Icc a b, ∀ x ∈ (F.metric b).ball p L, |
| 42 | (F.connection t).scalarCurvature x ≤ S) |
| 43 | (hr : 0 < r) |
| 44 | (hgap : r + (4 * ((m + 1 : ℕ) : ℝ) + 8 * S) * (b - a) < ρ) |
| 45 | (hρ : ρ ≤ L) : |
| 46 | (F.metric b).volumeMeasure ((F.metric b).ball p r) ≤ |
| 47 | (F.metric a).volumeMeasure ((F.metric a).ball p ρ) := by |
| 48 | have ha : a ∈ Icc a b := ⟨le_rfl, hab⟩ |
| 49 | have hb : b ∈ Icc a b := ⟨hab, le_rfl⟩ |
| 50 | have hD (t : ℝ) : (F.connection t).CurvatureTensorCalculus := |
| 51 | hC.tensor_calculus (m + 1) M (F.metric t) (F.connection t) |
| 52 | have hRic (t : ℝ) (ht : t ∈ Icc a b) (x : M) |
| 53 | (v : TangentSpace (𝓡 (m + 1)) x) : 0 ≤ (F.connection t).ricci x v v := |
| 54 | ((F.connection t).ricci_bounds_of_nonnegative_curvatureOperator |
| 55 | (hD t) x (hoperator t ht x) v).1 |
| 56 | have hupper (t : ℝ) (ht : t ∈ Icc a b) (x : M) |
| 57 | (hx : x ∈ (F.metric t).ball p ρ) (v : TangentSpace (𝓡 (m + 1)) x) : |
| 58 | (F.connection t).ricci x v v ≤ S * (F.metric t).inner x v v := by |
| 59 | have hxterminal : x ∈ (F.metric b).ball p ρ := |
| 60 | F.ball_subset_ball_of_ricci_nonneg hJ p ρ ht hb ht.2 |
| 61 | (fun s hs y _ w => hRic s hs y w) hx |
| 62 | have hxL : x ∈ (F.metric b).ball p L := |
| 63 | lt_of_lt_of_le hxterminal (ENNReal.ofReal_le_ofReal hρ) |
| 64 | have hv : 0 ≤ (F.metric t).inner x v v := by |
| 65 | by_cases hv : v = 0 |
| 66 | · subst v; simp |
| 67 | · exact ((F.metric t).pos x v hv).le |
| 68 | exact ((F.connection t).ricci_bounds_of_nonnegative_curvatureOperator |
| 69 | (hD t) x (hoperator t ht x) v).2.trans |
| 70 | (mul_le_mul_of_nonneg_right (hscalar t ht x hxL) hv) |
| 71 | have hsub : (F.metric b).ball p r ⊆ (F.metric a).ball p ρ := by |
| 72 | intro x hx |
| 73 | have h := F.terminal_closedBall_distance_bound hC hm hab hJ hcomplete hRic p hS |
| 74 | (by norm_num : 0 < (1 : ℝ)) hr.le hupper |
| 75 | (by simpa only [mul_one, div_one] using hgap) a ha x |
| 76 | (show (F.metric b).edist p x ≤ ENNReal.ofReal r from hx.le) |
| 77 | exact h.2 |
| 78 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 (m + 1)) : M → Type _) := |
| 79 | ⟨(F.metric b).toRiemannianMetric⟩ |
| 80 | let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin (m + 1))) |
| 81 | (TangentSpace (𝓡 (m + 1)) : M → Type _) := |
| 82 | ⟨⟨(F.metric b).inner, (F.metric b).toContinuousRiemannianMetric.continuous, |
| 83 | fun _ _ _ => rfl⟩⟩ |
| 84 | let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓡 (m + 1)) M |
| 85 | have hmeas : MeasurableSet ((F.metric b).ball p r) := |
| 86 | (isOpen_lt (continuous_const.edist continuous_id) continuous_const).measurableSet |
| 87 | have hfixed := F.antitoneOn_volumeMeasure_of_scalarCurvature_nonneg hJ |
| 88 | (fun t _ => hD t) hmeas |
| 89 | ((F.metric b).isCompact_closure_ball_of_metricComplete (hcomplete b hb) p r) |
| 90 | subset_closure (fun t ht x _ => Finset.sum_nonneg (fun i _ => hRic t ht x _)) |
| 91 | ha hb hab |
| 92 | apply (ENNReal.toReal_le_toReal |
| 93 | ((F.metric b).ball_volume_ne_top_of_metricComplete (hcomplete b hb) p r) |
| 94 | ((F.metric a).ball_volume_ne_top_of_metricComplete (hcomplete a ha) p ρ)).mp |
| 95 | exact hfixed.trans (ENNReal.toReal_mono |
| 96 | ((F.metric a).ball_volume_ne_top_of_metricComplete (hcomplete a ha) p ρ) |
| 97 | (measure_mono hsub)) |
| 98 | |
| 99 | /-- On a normalized cylinder, the terminal unit-ball volume gives a lower |
| 100 | volume bound at the same fixed dimension-dependent radius on every slice of |
| 101 | the last unit time interval. -/ |
| 102 | theorem terminal_unit_ball_volume_le_buffered_ball_of_cylinder |
| 103 | {m : ℕ} {M : Type u} [TopologicalSpace M] |
| 104 | [MeasurableSpace M] [BorelSpace M] [T3Space M] [SecondCountableTopology M] |
| 105 | [ChartedSpace (EuclideanSpace ℝ (Fin (m + 1))) M] |
| 106 | [IsManifold (𝓡 (m + 1)) ∞ M] {J : Set ℝ} |
| 107 | (hC : RicciFlowCurvatureCalculus.{u}) (F : RicciFlow (m + 1) M J) |
| 108 | (hm : 0 < m) (hJ : Icc (-1 : ℝ) 0 ⊆ interior J) |
| 109 | (hcomplete : ∀ t ∈ Icc (-1 : ℝ) 0, MetricComplete (F.metric t)) |
| 110 | (hoperator : ∀ t ∈ Icc (-1 : ℝ) 0, ∀ x : M, |
| 111 | (F.connection t).NonnegativeCurvatureOperator x) |
| 112 | (p : M) |
| 113 | (hscalar : ∀ t ∈ Icc (-1 : ℝ) 0, |
| 114 | ∀ x ∈ (F.metric 0).ball p (64 * (((m + 1 : ℕ) : ℝ) + 8)), |
| 115 | (F.connection t).scalarCurvature x ≤ 4) |
| 116 | {t : ℝ} (ht : t ∈ Icc (-1 : ℝ) 0) : |
| 117 | (F.metric 0).volumeMeasure ((F.metric 0).ball p 1) ≤ |
| 118 | (F.metric t).volumeMeasure |
| 119 | ((F.metric t).ball p (4 * ((m + 1 : ℕ) : ℝ) + 34)) := by |
| 120 | have hsub : Icc t 0 ⊆ Icc (-1 : ℝ) 0 := |
| 121 | fun _ hs => ⟨ht.1.trans hs.1, hs.2⟩ |
| 122 | apply F.terminal_ball_volume_le_earlier_ball_of_cylinder hC hm ht.2 |
| 123 | (fun _ hs => hJ (hsub hs)) (fun s hs => hcomplete s (hsub hs)) |
| 124 | (fun s hs => hoperator s (hsub hs)) (by norm_num : 0 ≤ (4 : ℝ)) p |
| 125 | (fun s hs => hscalar s (hsub hs)) (by norm_num : 0 < (1 : ℝ)) |
| 126 | · have hn : 0 ≤ ((m + 1 : ℕ) : ℝ) := by positivity |
| 127 | have h := mul_le_mul_of_nonneg_left (show 0 - t ≤ 1 by linarith [ht.1]) |
| 128 | (show 0 ≤ 4 * ((m + 1 : ℕ) : ℝ) + 8 * 4 by positivity) |
| 129 | linarith |
| 130 | · have hn : 0 ≤ ((m + 1 : ℕ) : ℝ) := by positivity |
| 131 | linarith |
| 132 | |
| 133 | end PoincareMT.RicciFlow |