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.Coordinates.Coefficients |
| 3 | import PoincareLib.Geometry.Riemannian.Curvature.NormBounds |
| 4 | |
| 5 | /-! |
| 6 | # Time comparison in fixed metric coordinates |
| 7 | |
| 8 | Curvature control along a fixed spatial image bounds the pullback quadratic |
| 9 | forms uniformly over the entire finite time interval. This is the time-control |
| 10 | step of Morgan--Tian, Proposition 5.14, pp. 90--91. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle |
| 17 | |
| 18 | namespace PoincareMT.RicciFlow |
| 19 | |
| 20 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] [T2Space M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 22 | {T' T : ℝ} |
| 23 | |
| 24 | /-- The coefficient comparison uses only curvature at the selected image |
| 25 | point, and its constants are independent of the selected time and vector. -/ |
| 26 | theorem pullbackCoefficients_exp_bounds |
| 27 | (F : RicciFlow n M (Ioo T' T)) (hT : T' < 0 ∧ 0 < T) |
| 28 | (e : EuclideanSpace ℝ (Fin n) → M) (x : EuclideanSpace ℝ (Fin n)) |
| 29 | {K : ℝ} (hK : 0 ≤ K) |
| 30 | (hcurv : ∀ t ∈ Ioo T' T, (F.connection t).curvatureTensorNorm (e x) ≤ K) |
| 31 | {t : ℝ} (ht : t ∈ Ioo T' T) (v : EuclideanSpace ℝ (Fin n)) : |
| 32 | Real.exp (-(2 * (n : ℝ) ^ 3 * K) * (T - T')) * |
| 33 | (F.metric 0).pullbackCoefficients e x v v ≤ |
| 34 | (F.metric t).pullbackCoefficients e x v v ∧ |
| 35 | (F.metric t).pullbackCoefficients e x v v ≤ |
| 36 | Real.exp ((2 * (n : ℝ) ^ 3 * K) * (T - T')) * |
| 37 | (F.metric 0).pullbackCoefficients e x v v := by |
| 38 | let w := mfderiv (𝓡 n) (𝓡 n) e x v |
| 39 | have hnonneg (τ : ℝ) : 0 ≤ (F.metric τ).inner (e x) w w := by |
| 40 | by_cases hw : w = 0 |
| 41 | · simp [hw] |
| 42 | · exact ((F.metric τ).pos (e x) w hw).le |
| 43 | have hRic : ∀ τ ∈ Ioo T' T, |(F.connection τ).ricci (e x) w w| ≤ |
| 44 | ((n : ℝ) ^ 3 * K) * (F.metric τ).inner (e x) w w := by |
| 45 | intro τ hτ |
| 46 | have h := (F.connection τ).abs_ricci_quadratic_le_curvatureTensorNorm (e x) w |
| 47 | have hdim : Module.finrank ℝ (TangentSpace (𝓡 n) (e x)) = n := |
| 48 | finrank_euclideanSpace_fin |
| 49 | simp only [Fintype.card_fin, hdim] at h |
| 50 | exact h.trans (mul_le_mul_of_nonneg_right |
| 51 | (mul_le_mul_of_nonneg_left (hcurv τ hτ) (by positivity)) (hnonneg τ)) |
| 52 | have h := F.metric_inner_self_exp_bounds (convex_Ioo T' T) (Subset.refl _) |
| 53 | (e x) w ((n : ℝ) ^ 3 * K) hRic hT ht |
| 54 | have htime : |t - 0| ≤ T - T' := by |
| 55 | rw [abs_le] |
| 56 | constructor <;> linarith [ht.1, ht.2, hT.1, hT.2] |
| 57 | have hC : 0 ≤ 2 * ((n : ℝ) ^ 3 * K) := by positivity |
| 58 | change Real.exp (-(2 * (n : ℝ) ^ 3 * K) * (T - T')) * |
| 59 | (F.metric 0).inner (e x) w w ≤ (F.metric t).inner (e x) w w ∧ |
| 60 | (F.metric t).inner (e x) w w ≤ |
| 61 | Real.exp ((2 * (n : ℝ) ^ 3 * K) * (T - T')) * (F.metric 0).inner (e x) w w |
| 62 | constructor |
| 63 | · apply le_trans (mul_le_mul_of_nonneg_right |
| 64 | (Real.exp_le_exp.mpr ?_) (hnonneg 0)) h.1 |
| 65 | nlinarith [mul_le_mul_of_nonneg_left htime hC] |
| 66 | · apply h.2.trans (mul_le_mul_of_nonneg_right |
| 67 | (Real.exp_le_exp.mpr ?_) (hnonneg 0)) |
| 68 | nlinarith [mul_le_mul_of_nonneg_left htime hC] |
| 69 | |
| 70 | end PoincareMT.RicciFlow |