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.Soliton.TwoDimensional.Compact.Identities |
| 2 | import Mathlib.Analysis.Calculus.MeanValue |
| 3 | |
| 4 | /-! |
| 5 | # Homothety of the normalized round ancient surface flow |
| 6 | |
| 7 | On a surface with scalar curvature `-1 / t`, the Ricci equation says that |
| 8 | the metric divided by `-t` is constant. The resulting homothety uses the |
| 9 | identity diffeomorphism and the actual time-dependent metric. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | |
| 17 | namespace PoincareMT.RicciFlow |
| 18 | |
| 19 | variable {M : Type*} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] [IsManifold (𝓡 2) ∞ M] |
| 21 | |
| 22 | /-- The scalar normalization fixes every time-dependent metric coefficient. -/ |
| 23 | theorem inner_eq_neg_time_mul_of_scalarCurvature |
| 24 | (F : RicciFlow 2 M (Set.Iio 0)) |
| 25 | (hR : ∀ t : ℝ, t < 0 → ∀ x : M, (F.connection t).scalarCurvature x = -1 / t) |
| 26 | (t : ℝ) (ht : t < 0) (x : M) (u v : TangentSpace (𝓡 2) x) : |
| 27 | (F.metric t).inner x u v = -t * (F.metric (-1)).inner x u v := by |
| 28 | have hg (s : ℝ) (hs : s < 0) : |
| 29 | HasDerivAt (fun z => (F.metric z).inner x u v) |
| 30 | ((F.metric s).inner x u v / s) s := by |
| 31 | have h := (F.equation s hs x u v).hasDerivAt (isOpen_Iio.mem_nhds hs) |
| 32 | have hc : -2 * (F.connection s).ricci x u v = (F.metric s).inner x u v / s := by |
| 33 | rw [(F.connection s).ricci_eq_half_scalarCurvature_mul_inner, hR s hs] |
| 34 | ring |
| 35 | rw [hc] at h |
| 36 | exact h |
| 37 | have hq (s : ℝ) (hs : s < 0) : |
| 38 | HasDerivAt (fun z => (F.metric z).inner x u v / (-z)) 0 s := by |
| 39 | have hs0 : s ≠ 0 := ne_of_lt hs |
| 40 | have h := (hg s hs).div (hasDerivAt_id s).neg (neg_ne_zero.mpr hs0) |
| 41 | have hc : ((F.metric s).inner x u v / s * (-s) - |
| 42 | (F.metric s).inner x u v * (-1)) / (-s) ^ 2 = 0 := by |
| 43 | field_simp |
| 44 | ring |
| 45 | simp only [Pi.neg_apply, id_eq] at h |
| 46 | rw [hc] at h |
| 47 | exact h |
| 48 | have heq := isOpen_Iio.is_const_of_deriv_eq_zero (convex_Iio (0 : ℝ)).isPreconnected |
| 49 | (fun s hs => (hq s hs).differentiableAt.differentiableWithinAt) |
| 50 | (fun s hs => (hq s hs).deriv) ht (show (-1 : ℝ) ∈ Set.Iio 0 by norm_num) |
| 51 | norm_num only [neg_neg, div_one] at heq |
| 52 | have h := (div_eq_iff (neg_ne_zero.mpr (ne_of_lt ht))).mp heq |
| 53 | simpa only [mul_comm] using h |
| 54 | |
| 55 | /-- The normalized round ancient surface flow is exactly homothetic to time `-1`. -/ |
| 56 | theorem homotheticMetricSlice_of_scalarCurvature |
| 57 | (F : RicciFlow 2 M (Set.Iio 0)) |
| 58 | (hR : ∀ t : ℝ, t < 0 → ∀ x : M, (F.connection t).scalarCurvature x = -1 / t) |
| 59 | (t : ℝ) (ht : t < 0) : |
| 60 | Nonempty (HomotheticMetricSlice (F.metric (-1)) (F.metric t) |t|) := by |
| 61 | refine ⟨{ map := Diffeomorph.refl (𝓡 2) M ∞, inner_eq := ?_ }⟩ |
| 62 | intro x u v |
| 63 | simpa only [Diffeomorph.coe_refl, id_eq, mfderiv_id, ContinuousLinearMap.id_apply, |
| 64 | abs_of_neg ht] using F.inner_eq_neg_time_mul_of_scalarCurvature hR t ht x u v |
| 65 | |
| 66 | end PoincareMT.RicciFlow |