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.Basic |
| 2 | import PoincareLib.Geometry.Riemannian.MetricComparison |
| 3 | import PoincareLib.Analysis.ODE.LogDerivative |
| 4 | |
| 5 | /-! |
| 6 | # Local metric comparison along Ricci flow |
| 7 | |
| 8 | Integrating the actual Ricci-flow equation at a fixed point compares its |
| 9 | metrics from a local quadratic-form bound on Ricci. The estimate requires |
| 10 | control only at that point and on the intervening time interval. |
| 11 | |
| 12 | This is the metric-variation step in the local-cylinder argument for |
| 13 | Morgan--Tian, Theorem 3.28, p. 51, and Proposition 5.14, pp. 90--91. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | namespace PoincareMT.RicciFlow |
| 21 | |
| 22 | /-- Exponential comparison of squared tangent lengths on a convex time set. |
| 23 | The Ricci bound is required only at the selected point and vector. -/ |
| 24 | theorem metric_inner_self_exp_bounds |
| 25 | {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 26 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 27 | {J I : Set ℝ} (F : RicciFlow n M J) |
| 28 | (hI : Convex ℝ I) (hIJ : I ⊆ J) |
| 29 | (x : M) (v : TangentSpace (𝓡 n) x) (K : ℝ) |
| 30 | (hRic : ∀ t ∈ I, |
| 31 | |(F.connection t).ricci x v v| ≤ K * (F.metric t).inner x v v) |
| 32 | {a b : ℝ} (ha : a ∈ I) (hb : b ∈ I) : |
| 33 | Real.exp (-(2 * K) * |b - a|) * (F.metric a).inner x v v ≤ |
| 34 | (F.metric b).inner x v v ∧ |
| 35 | (F.metric b).inner x v v ≤ |
| 36 | Real.exp ((2 * K) * |b - a|) * (F.metric a).inner x v v := by |
| 37 | by_cases hv : v = 0 |
| 38 | · subst v |
| 39 | simp |
| 40 | apply Poincare.exp_bounds_of_abs_deriv_le_mul hI |
| 41 | (fun t _ ↦ (F.metric t).pos x v hv) |
| 42 | (fun t ht ↦ (F.equation t (hIJ ht) x v v).mono hIJ) ?_ ha hb |
| 43 | intro t ht |
| 44 | calc |
| 45 | |-2 * (F.connection t).ricci x v v| = |
| 46 | 2 * |(F.connection t).ricci x v v| := by rw [abs_mul]; norm_num |
| 47 | _ ≤ 2 * (K * (F.metric t).inner x v v) := |
| 48 | mul_le_mul_of_nonneg_left (hRic t ht) (by norm_num) |
| 49 | _ = (2 * K) * (F.metric t).inner x v v := by ring |
| 50 | |
| 51 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 52 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 53 | {J : Set ℝ} |
| 54 | |
| 55 | /-- The corresponding comparison of tangent norms has half the exponent. -/ |
| 56 | theorem tangentNorm_le_exp_of_ricci_bound |
| 57 | (F : RicciFlow n M J) {I : Set ℝ} (hI : Convex ℝ I) (hIJ : I ⊆ J) |
| 58 | (x : M) (v : TangentSpace (𝓡 n) x) (K : ℝ) |
| 59 | (hRic : ∀ t ∈ I, |
| 60 | |(F.connection t).ricci x v v| ≤ K * (F.metric t).inner x v v) |
| 61 | {s t : ℝ} (hs : s ∈ I) (ht : t ∈ I) : |
| 62 | (F.metric t).tangentNorm x v ≤ |
| 63 | Real.exp (K * |t - s|) * (F.metric s).tangentNorm x v := by |
| 64 | have h := (F.metric_inner_self_exp_bounds hI hIJ x v K hRic hs ht).2 |
| 65 | have hexp : Real.exp ((2 * K) * |t - s|) = |
| 66 | Real.exp (K * |t - s|) ^ 2 := by |
| 67 | rw [← Real.exp_nat_mul] |
| 68 | congr 1 |
| 69 | ring |
| 70 | have hsqrt := Real.sqrt_le_sqrt h |
| 71 | rw [hexp, Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq (Real.exp_nonneg _)] at hsqrt |
| 72 | exact hsqrt |
| 73 | |
| 74 | /-- A Ricci bound on a reference-time ball controls its radius at other times. -/ |
| 75 | theorem ball_subset_ball_of_ricci_bound |
| 76 | (F : RicciFlow n M J) {I : Set ℝ} (hI : Convex ℝ I) (hIJ : I ⊆ J) |
| 77 | (p : M) (r K : ℝ) {s t : ℝ} (hs : s ∈ I) (ht : t ∈ I) |
| 78 | (hRic : ∀ τ ∈ I, ∀ x ∈ (F.metric s).ball p r, |
| 79 | ∀ v : TangentSpace (𝓡 n) x, |
| 80 | |(F.connection τ).ricci x v v| ≤ K * (F.metric τ).inner x v v) : |
| 81 | (F.metric s).ball p r ⊆ |
| 82 | (F.metric t).ball p (Real.exp (K * |t - s|) * r) := by |
| 83 | apply RiemannianMetric.ball_subset_ball_of_tangentNorm_le |
| 84 | _ _ _ _ _ (Real.exp_pos _) |
| 85 | intro x hx v |
| 86 | exact F.tangentNorm_le_exp_of_ricci_bound hI hIJ x v K |
| 87 | (fun τ hτ ↦ hRic τ hτ x hx v) hs ht |
| 88 | |
| 89 | /-- Local Ricci control bounds distances between points of a reference ball. |
| 90 | The larger control ball accommodates paths approaching the reference distance. -/ |
| 91 | theorem edist_le_exp_mul_of_ricci_bound |
| 92 | (F : RicciFlow n M J) {I : Set ℝ} (hI : Convex ℝ I) (hIJ : I ⊆ J) |
| 93 | (p : M) (r K : ℝ) (hr : 0 < r) {s t : ℝ} (hs : s ∈ I) (ht : t ∈ I) |
| 94 | (hRic : ∀ τ ∈ I, ∀ z ∈ (F.metric s).ball p (3 * r), |
| 95 | ∀ v : TangentSpace (𝓡 n) z, |
| 96 | |(F.connection τ).ricci z v v| ≤ K * (F.metric τ).inner z v v) |
| 97 | {x y : M} (hx : x ∈ (F.metric s).ball p r) |
| 98 | (hy : y ∈ (F.metric s).ball p r) : |
| 99 | (F.metric t).edist x y ≤ ENNReal.ofReal (Real.exp (K * |t - s|)) * |
| 100 | (F.metric s).edist x y := by |
| 101 | apply RiemannianMetric.edist_le_mul_edist_of_tangentNorm_le_on_ball |
| 102 | _ _ p r _ hr (Real.exp_pos _) _ hx hy |
| 103 | intro z hz v |
| 104 | exact F.tangentNorm_le_exp_of_ricci_bound hI hIJ z v K |
| 105 | (fun τ hτ ↦ hRic τ hτ z hz v) hs ht |
| 106 | |
| 107 | end PoincareMT.RicciFlow |