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.Pinching.CurvatureTensor |
| 2 | import PoincareLib.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureSymmetries |
| 3 | import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Compatibility.Curvature |
| 4 | import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Analysis.OrthonormalPairExtension |
| 5 | |
| 6 | /-! |
| 7 | # Scalar and sectional decomposition of the tangent Ricci trace |
| 8 | |
| 9 | Morgan-Tian Claim 18.12, printed pp. 426-427, and Hamilton (1999), |
| 10 | Section 11, printed p. 718. In dimension three the Ricci trace on an |
| 11 | orthonormal two-plane equals half the scalar curvature plus the |
| 12 | sectional curvature of that plane, with the frozen curvature sign. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle BigOperators |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | open Poincare.Geometry.Curvature.Operator |
| 25 | |
| 26 | variable {M : Type u} [TopologicalSpace M] [T2Space M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 28 | {g : RiemannianMetric 3 M} |
| 29 | |
| 30 | /-- The Ricci two-plane trace in an actual orthonormal three-frame. |
| 31 | Source: MT Claim 18.12, pp. 426-427; Hamilton (1999), p. 718. -/ |
| 32 | theorem m60Ricci_plane_trace_basis (D : LeviCivitaData g) |
| 33 | (hD : D.CurvatureTensorCalculus) (x : M) : |
| 34 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 35 | ⟨g.toRiemannianMetric⟩ |
| 36 | ∀ b : OrthonormalBasis (Fin 3) ℝ (TangentSpace (𝓡 3) x), |
| 37 | D.ricci x (b 0) (b 0) + D.ricci x (b 1) (b 1) = |
| 38 | D.scalarCurvature x / 2 + D.curvatureTensor x (b 0) (b 1) (b 0) (b 1) := by |
| 39 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 40 | ⟨g.toRiemannianMetric⟩ |
| 41 | intro b |
| 42 | have hzero (i : Fin 3) : D.curvatureTensor x (b i) (b i) (b i) (b i) = 0 := by |
| 43 | have h := M04.curvatureTensor_swap_first D x (b i) (b i) (b i) (b i) |
| 44 | linarith |
| 45 | have hswap (i j : Fin 3) : D.curvatureTensor x (b i) (b j) (b i) (b j) = |
| 46 | D.curvatureTensor x (b j) (b i) (b j) (b i) := by |
| 47 | rw [M04.curvatureTensor_swap_first, M04.curvatureTensor_swap_last, neg_neg] |
| 48 | have h0 := D.ricci_eq_sum_orthonormalBasis hD x b (b 0) (b 0) |
| 49 | have h1 := D.ricci_eq_sum_orthonormalBasis hD x b (b 1) (b 1) |
| 50 | have hs := D.scalarCurvature_eq_twice_trace_curvatureOperator hD x b |
| 51 | rw [curvatureOperator_trace] at hs |
| 52 | have hs' : D.scalarCurvature x = 2 * |
| 53 | (D.curvatureTensor x (b 1) (b 2) (b 1) (b 2) + |
| 54 | D.curvatureTensor x (b 2) (b 0) (b 2) (b 0) + |
| 55 | D.curvatureTensor x (b 0) (b 1) (b 0) (b 1)) := by |
| 56 | simpa [Matrix.trace, Matrix.diag, curvatureMatrix, Fin.sum_univ_succ, |
| 57 | pairFirst, pairSecond, add_assoc] using hs |
| 58 | simp only [Fin.sum_univ_three, hzero, zero_add, add_zero] at h0 h1 |
| 59 | rw [hswap 1 0] at h1 |
| 60 | rw [hswap 2 0] at hs' |
| 61 | linarith |
| 62 | |
| 63 | /-- The dimension-three Ricci trace formula for any orthonormal pair. |
| 64 | Source: MT Claim 18.12, pp. 426-427; Hamilton (1999), p. 718. -/ |
| 65 | theorem m60Ricci_plane_trace (D : LeviCivitaData g) |
| 66 | (hD : D.CurvatureTensorCalculus) (x : M) (u v : TangentSpace (𝓡 3) x) |
| 67 | (hu : g.inner x u u = 1) (hv : g.inner x v v = 1) (huv : g.inner x u v = 0) : |
| 68 | D.ricci x u u + D.ricci x v v = |
| 69 | D.scalarCurvature x / 2 + D.curvatureTensor x u v u v := by |
| 70 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 71 | ⟨g.toRiemannianMetric⟩ |
| 72 | let : FiniteDimensional ℝ (TangentSpace (𝓡 3) x) := by |
| 73 | unfold TangentSpace |
| 74 | infer_instance |
| 75 | obtain ⟨b, hb0, hb1⟩ := M60.exists_orthonormalBasis_pair |
| 76 | (E := TangentSpace (𝓡 3) x) |
| 77 | (by change Module.finrank ℝ (EuclideanSpace ℝ (Fin 3)) = 3; simp) |
| 78 | u v hu hv huv |
| 79 | simpa only [hb0, hb1] using m60Ricci_plane_trace_basis D hD x b |
| 80 | |
| 81 | end PoincareMT |