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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.RoundProductCurvature |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.RoundSurfaceRicci |
| 4 | import PoincareLib.Geometry.RicciFlow.Limit.RicciConvergence |
| 5 | import Mathlib.LinearAlgebra.Basis.Prod |
| 6 | |
| 7 | /-! |
| 8 | # The native Ricci tensor of the factor times a line |
| 9 | |
| 10 | An actual factor orthonormal basis and the unit line vector form a product |
| 11 | basis with identity Gram matrix. The genuine inverse-Gram curvature trace |
| 12 | therefore equals the two-dimensional Ricci trace, with no line contribution. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle BigOperators |
| 19 | |
| 20 | namespace PoincareMT.M35 |
| 21 | |
| 22 | local notation "V" => EuclideanSpace ℝ (Fin 3) |
| 23 | local notation "E2" => EuclideanSpace ℝ (Fin 2) |
| 24 | |
| 25 | /-- The actual product Ricci tensor is the native factor Ricci tensor |
| 26 | on the two horizontal components. -/ |
| 27 | theorem product_ricci |
| 28 | {g : RiemannianMetric 3 V} {h : RiemannianMetric 2 E2} |
| 29 | (D : LeviCivitaData g) (Dh : LeviCivitaData h) |
| 30 | (hmetric : ∀ x u v : V, |
| 31 | g.inner x u v = h.inner (cylinderCoordinateEquiv x).1 |
| 32 | (cylinderCoordinateEquiv u).1 (cylinderCoordinateEquiv v).1 + |
| 33 | (cylinderCoordinateEquiv u).2 * (cylinderCoordinateEquiv v).2) |
| 34 | (x u v : V) : |
| 35 | D.ricci x u v = Dh.ricci (cylinderCoordinateEquiv x).1 |
| 36 | (cylinderCoordinateEquiv u).1 (cylinderCoordinateEquiv v).1 := by |
| 37 | classical |
| 38 | let a := (cylinderCoordinateEquiv x).1 |
| 39 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 2) : E2 → Type _) := |
| 40 | ⟨h.toRiemannianMetric⟩ |
| 41 | have hdim : Module.finrank ℝ (TangentSpace (𝓡 2) a) = 2 := finrank_euclideanSpace_fin |
| 42 | let b2 := (h.orthonormalBasis a).reindex (finCongr hdim) |
| 43 | let b : Module.Basis (Fin 2 ⊕ Unit) ℝ (TangentSpace (𝓡 3) x) := |
| 44 | (b2.toBasis.prod (Module.Basis.singleton Unit ℝ)).map |
| 45 | cylinderCoordinateEquiv.symm.toLinearEquiv |
| 46 | have hbL (i : Fin 2) : cylinderCoordinateEquiv (b (Sum.inl i)) = (b2 i, 0) := by |
| 47 | dsimp only [b] |
| 48 | rw [Module.Basis.map_apply, Module.Basis.prod_apply] |
| 49 | simp only [Sum.elim_inl, Function.comp_apply, LinearMap.inl_apply, |
| 50 | OrthonormalBasis.coe_toBasis] |
| 51 | exact cylinderCoordinateEquiv.apply_symm_apply _ |
| 52 | have hbR (i : Unit) : cylinderCoordinateEquiv (b (Sum.inr i)) = (0, 1) := by |
| 53 | dsimp only [b] |
| 54 | rw [Module.Basis.map_apply, Module.Basis.prod_apply] |
| 55 | simp only [Sum.elim_inr, Function.comp_apply, LinearMap.inr_apply, |
| 56 | Module.Basis.singleton_apply] |
| 57 | exact cylinderCoordinateEquiv.apply_symm_apply _ |
| 58 | have hgram : Matrix.of (fun i j => g.inner x (b i) (b j)) = 1 := by |
| 59 | ext i j |
| 60 | rw [Matrix.of_apply, hmetric] |
| 61 | cases i with |
| 62 | | inl i => |
| 63 | cases j with |
| 64 | | inl j => |
| 65 | simp only [hbL, zero_mul, add_zero] |
| 66 | change h.inner a (b2 i) (b2 j) = _ |
| 67 | have hi : h.inner a (b2 i) (b2 j) = if i = j then 1 else 0 := |
| 68 | b2.inner_eq_ite i j |
| 69 | simpa only [Matrix.one_apply, Sum.inl.injEq] using hi |
| 70 | | inr j => simp [hbL, hbR] |
| 71 | | inr i => |
| 72 | cases j with |
| 73 | | inl j => simp [hbL, hbR] |
| 74 | | inr j => simp [hbR] |
| 75 | obtain ⟨A, hA⟩ := D.exists_multilinear_curvatureTensor x |
| 76 | rw [D.ricci_eq_inverse_gram x b A hA u v, hgram, inv_one] |
| 77 | simp only [Matrix.one_apply, ite_mul, one_mul, zero_mul, |
| 78 | Finset.sum_ite_eq, Finset.mem_univ, if_true] |
| 79 | rw [Fintype.sum_sum_type] |
| 80 | simp only [product_curvatureTensor D Dh hmetric, hbL, hbR, Fintype.sum_unique] |
| 81 | have hz : Dh.curvatureTensor a (cylinderCoordinateEquiv u).1 0 |
| 82 | (cylinderCoordinateEquiv v).1 0 = 0 := by |
| 83 | rw [← M13.curvatureTensorLinear_apply] |
| 84 | simp only [map_zero, LinearMap.zero_apply] |
| 85 | change (∑ i : Fin 2, Dh.curvatureTensor a (cylinderCoordinateEquiv u).1 |
| 86 | (b2 i) (cylinderCoordinateEquiv v).1 (b2 i)) + |
| 87 | Dh.curvatureTensor a (cylinderCoordinateEquiv u).1 0 |
| 88 | (cylinderCoordinateEquiv v).1 0 = _ |
| 89 | rw [hz, add_zero] |
| 90 | exact (M13.ricci_eq_sum_basis Dh a b2 _ _).symm |
| 91 | |
| 92 | /-- In a round product the actual Ricci tensor equals the common sphere |
| 93 | sectional curvature times the actual horizontal metric. -/ |
| 94 | theorem round_product_ricci |
| 95 | {g : RiemannianMetric 3 V} {h : RiemannianMetric 2 E2} |
| 96 | (D : LeviCivitaData g) (Dh : LeviCivitaData h) |
| 97 | (hmetric : ∀ x u v : V, |
| 98 | g.inner x u v = h.inner (cylinderCoordinateEquiv x).1 |
| 99 | (cylinderCoordinateEquiv u).1 (cylinderCoordinateEquiv v).1 + |
| 100 | (cylinderCoordinateEquiv u).2 * (cylinderCoordinateEquiv v).2) |
| 101 | (c : ℝ) |
| 102 | (hround : ∀ x u v, h.inner x u u = 1 → h.inner x v v = 1 → |
| 103 | h.inner x u v = 0 → Dh.sectionalCurvature x u v = c) |
| 104 | (x u v : V) : |
| 105 | D.ricci x u v = c * h.inner (cylinderCoordinateEquiv x).1 |
| 106 | (cylinderCoordinateEquiv u).1 (cylinderCoordinateEquiv v).1 := by |
| 107 | rw [product_ricci D Dh hmetric] |
| 108 | exact surface_ricci_of_sectional Dh _ c (hround _) _ _ |
| 109 | |
| 110 | end PoincareMT.M35 |