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.LinearAlgebra.BilinearForm.Trace |
| 2 | import PoincareLib.Geometry.RicciFlow.Harnack.TwoForm |
| 3 | import PoincareLib.Geometry.Riemannian.Curvature.Basic |
| 4 | |
| 5 | /-! |
| 6 | # Ricci bounds from a nonnegative curvature operator |
| 7 | |
| 8 | The M06 curvature operator is the frozen finite sum over skew coefficient |
| 9 | arrays. Evaluating it on half-wedges and tracing in the orthonormal frame |
| 10 | gives the Ricci quadratic form. The final trace estimate is a finite |
| 11 | positive-quadratic-form argument and does not use a diagonalisation theorem. |
| 12 | -/ |
| 13 | |
| 14 | open scoped BigOperators |
| 15 | |
| 16 | namespace Poincare.Geometry.Curvature.Operator |
| 17 | |
| 18 | variable {I : Type*} [Fintype I] [DecidableEq I] |
| 19 | |
| 20 | /-- The elementary half-wedge coefficients used to test the curvature operator. -/ |
| 21 | noncomputable def halfWedge (v : I → ℝ) (a i j : I) : ℝ := |
| 22 | (v i * (if j = a then 1 else 0) - |
| 23 | (if i = a then 1 else 0) * v j) / 2 |
| 24 | |
| 25 | theorem curvature_operator_ricci_trace |
| 26 | (Rm : I → I → I → I → ℝ) (Ric : I → I → ℝ) |
| 27 | (hfirst : ∀ i j k l, Rm i j k l = -Rm j i k l) |
| 28 | (hlast : ∀ i j k l, Rm i j k l = -Rm i j l k) |
| 29 | (hRic : ∀ k l, ∑ i, Rm k i l i = Ric k l) |
| 30 | (v : I → ℝ) |
| 31 | (hoperator : ∀ A : I → I → ℝ, (∀ i j, A i j = -A j i) → |
| 32 | 0 ≤ ∑ i, ∑ j, ∑ k, ∑ l, Rm i j k l * A i j * A k l) : |
| 33 | 0 ≤ ∑ i, ∑ k, Ric i k * v i * v k := by |
| 34 | classical |
| 35 | have hA (a : I) : |
| 36 | ∀ i j, halfWedge v a i j = -halfWedge v a j i := by |
| 37 | intro i j |
| 38 | simp only [halfWedge] |
| 39 | split_ifs <;> ring |
| 40 | have hnonneg (a : I) : |
| 41 | 0 ≤ ∑ i, ∑ j, ∑ k, ∑ l, |
| 42 | Rm i j k l * halfWedge v a i j * halfWedge v a k l := by |
| 43 | exact hoperator (halfWedge v a) (hA a) |
| 44 | have htrace := Finset.sum_nonneg (s := Finset.univ) |
| 45 | (fun a _ => hnonneg a) |
| 46 | have hcontract := |
| 47 | Poincare.RicciFlow.Harnack.curvature_contraction_half_wedge_trace |
| 48 | Rm Ric hfirst hlast hRic v |
| 49 | rw [← hcontract] |
| 50 | simpa [halfWedge] using htrace |
| 51 | |
| 52 | theorem ricci_bounds_of_nonnegative_operator |
| 53 | (Rm : I → I → I → I → ℝ) (Ric : I → I → ℝ) |
| 54 | (hfirst : ∀ i j k l, Rm i j k l = -Rm j i k l) |
| 55 | (hlast : ∀ i j k l, Rm i j k l = -Rm i j l k) |
| 56 | (hRic : ∀ k l, ∑ i, Rm k i l i = Ric k l) |
| 57 | (v : I → ℝ) |
| 58 | (hoperator : ∀ A : I → I → ℝ, (∀ i j, A i j = -A j i) → |
| 59 | 0 ≤ ∑ i, ∑ j, ∑ k, ∑ l, Rm i j k l * A i j * A k l) : |
| 60 | 0 ≤ ∑ i, ∑ k, Ric i k * v i * v k ∧ |
| 61 | (∑ i, ∑ k, Ric i k * v i * v k) ≤ |
| 62 | (∑ i, Ric i i) * ∑ i, (v i) ^ 2 := by |
| 63 | have hnonneg := curvature_operator_ricci_trace Rm Ric hfirst hlast hRic v hoperator |
| 64 | have hquad : ∀ w : I → ℝ, 0 ≤ ∑ i, ∑ k, Ric i k * w i * w k := by |
| 65 | intro w |
| 66 | exact curvature_operator_ricci_trace Rm Ric hfirst hlast hRic w hoperator |
| 67 | exact ⟨hnonneg, |
| 68 | Poincare.LinearAlgebra.quadratic_le_trace_mul_sum_sq Ric hquad v⟩ |
| 69 | |
| 70 | end Poincare.Geometry.Curvature.Operator |
| 71 | |
| 72 | namespace PoincareMT |
| 73 | |
| 74 | open scoped Manifold ContDiff Bundle BigOperators |
| 75 | |
| 76 | universe u |
| 77 | |
| 78 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 79 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 80 | [IsManifold (𝓡 n) ∞ M] |
| 81 | {g : RiemannianMetric n M} |
| 82 | |
| 83 | namespace LeviCivitaData |
| 84 | |
| 85 | /-- A skew coefficient array in the pointwise orthonormal frame. -/ |
| 86 | def IsSkewCoefficient (d : ℕ) (A : Fin d → Fin d → ℝ) : Prop := |
| 87 | ∀ i j, A i j = -A j i |
| 88 | |
| 89 | /-- The finite-sum curvature-operator quadratic form from the frozen M06 contract. -/ |
| 90 | noncomputable def curvatureOperatorQuadratic (D : LeviCivitaData g) |
| 91 | (x : M) (A : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → |
| 92 | Fin (Module.finrank ℝ (TangentSpace (𝓡 n) x)) → ℝ) : ℝ := |
| 93 | let b := g.orthonormalBasis x |
| 94 | ∑ i, ∑ j, ∑ k, ∑ l, |
| 95 | A i j * A k l * D.curvatureTensor x (b i) (b j) (b k) (b l) |
| 96 | |
| 97 | /-- Nonnegative curvature operator, quantified over all skew arrays. -/ |
| 98 | def NonnegativeCurvatureOperator (D : LeviCivitaData g) (x : M) : Prop := |
| 99 | ∀ A, IsSkewCoefficient (Module.finrank ℝ (TangentSpace (𝓡 n) x)) A → |
| 100 | 0 ≤ D.curvatureOperatorQuadratic x A |
| 101 | |
| 102 | /-- The pointwise curvature-operator bound from the frozen M06 contract. -/ |
| 103 | def CurvatureOperatorBound (D : LeviCivitaData g) |
| 104 | (K : ℝ) (x : M) : Prop := |
| 105 | ∀ A, IsSkewCoefficient (Module.finrank ℝ (TangentSpace (𝓡 n) x)) A → |
| 106 | |D.curvatureOperatorQuadratic x A| ≤ |
| 107 | K * ∑ i, ∑ j, (A i j) ^ 2 |
| 108 | |
| 109 | end LeviCivitaData |
| 110 | end PoincareMT |