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.Curvature.Operator.Bounds |
| 2 | import PoincareLib.Geometry.Riemannian.Curvature.SectionalBounds |
| 3 | |
| 4 | /-! |
| 5 | # Sectional nonnegativity from the curvature operator |
| 6 | |
| 7 | Testing the operator on the half-wedge of two tangent vectors gives the |
| 8 | sectional numerator. This supplies the sectional lower hypothesis of |
| 9 | Petrunin, Theorem 1.1, from the nonnegative-operator hypothesis used in the |
| 10 | Ricci-flow moving-ball comparison. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle BigOperators |
| 16 | |
| 17 | namespace PoincareMT.LeviCivitaData |
| 18 | |
| 19 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 21 | {g : RiemannianMetric n M} |
| 22 | |
| 23 | private lemma curvatureTensor_sum_frame (D : LeviCivitaData g) (x : M) |
| 24 | (u v : TangentSpace (𝓡 n) x) : |
| 25 | D.curvatureTensor x u v u v = |
| 26 | ∑ i, ∑ j, ∑ k, ∑ l, |
| 27 | D.curvatureTensor x (g.orthonormalBasis x i) (g.orthonormalBasis x j) |
| 28 | (g.orthonormalBasis x k) (g.orthonormalBasis x l) * |
| 29 | g.inner x (g.orthonormalBasis x i) u * |
| 30 | g.inner x (g.orthonormalBasis x j) v * |
| 31 | g.inner x (g.orthonormalBasis x k) u * |
| 32 | g.inner x (g.orthonormalBasis x l) v := by |
| 33 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 34 | ⟨g.toRiemannianMetric⟩ |
| 35 | let b := g.orthonormalBasis x |
| 36 | have hpair (p q y z : TangentSpace (𝓡 n) x) : |
| 37 | D.curvatureTensor x p y q z = |
| 38 | ∑ i, ∑ k, D.curvatureTensor x (b i) y (b k) z * |
| 39 | inner ℝ (b i) p * inner ℝ (b k) q := by |
| 40 | rw [← D.curvatureTensor_bilinear_first_third_apply] |
| 41 | conv_lhs => rw [← b.sum_repr' p, ← b.sum_repr' q] |
| 42 | simp only [map_sum, map_smul, LinearMap.sum_apply, LinearMap.smul_apply, |
| 43 | smul_eq_mul, Finset.mul_sum] |
| 44 | rw [Finset.sum_comm] |
| 45 | apply Finset.sum_congr rfl |
| 46 | intro i _ |
| 47 | apply Finset.sum_congr rfl |
| 48 | intro k _ |
| 49 | simp only [curvatureTensor_bilinear_first_third_apply] |
| 50 | ring |
| 51 | have hswap (p q y z : TangentSpace (𝓡 n) x) : |
| 52 | D.curvatureTensor x p y q z = D.curvatureTensor x y p z q := by |
| 53 | rw [D.curvatureTensor_swap_first, D.curvatureTensor_swap_last, neg_neg] |
| 54 | rw [hpair u u v v] |
| 55 | simp_rw [hswap (b _) (b _) v v, hpair v v (b _) (b _)] |
| 56 | simp only [Finset.sum_mul] |
| 57 | apply Finset.sum_congr rfl |
| 58 | intro i _ |
| 59 | rw [Finset.sum_comm] |
| 60 | apply Finset.sum_congr rfl |
| 61 | intro j _ |
| 62 | apply Finset.sum_congr rfl |
| 63 | intro k _ |
| 64 | apply Finset.sum_congr rfl |
| 65 | intro l _ |
| 66 | rw [← hswap (b i) (b k) (b j) (b l)] |
| 67 | change _ = _ * inner ℝ (b i) u * inner ℝ (b j) v * inner ℝ (b k) u * inner ℝ (b l) v |
| 68 | ring |
| 69 | |
| 70 | /-- A nonnegative curvature operator has a nonnegative sectional numerator. -/ |
| 71 | theorem curvatureTensor_self_nonneg_of_nonnegative_curvatureOperator |
| 72 | (D : LeviCivitaData g) (x : M) (hoperator : D.NonnegativeCurvatureOperator x) |
| 73 | (u v : TangentSpace (𝓡 n) x) : 0 ≤ D.curvatureTensor x u v u v := by |
| 74 | let b := g.orthonormalBasis x |
| 75 | let U := fun i => g.inner x (b i) u |
| 76 | let V := fun i => g.inner x (b i) v |
| 77 | let A := fun i j => (U i * V j - V i * U j) / 2 |
| 78 | have hA : IsSkewCoefficient _ A := by |
| 79 | intro i j |
| 80 | dsimp only [A] |
| 81 | ring |
| 82 | have hop := hoperator A hA |
| 83 | unfold curvatureOperatorQuadratic at hop |
| 84 | let R := fun i j k l => D.curvatureTensor x (b i) (b j) (b k) (b l) |
| 85 | have heq := Poincare.RicciFlow.Harnack.curvature_contraction_half_wedge R |
| 86 | (fun i j k l => D.curvatureTensor_swap_first x (b i) (b j) (b k) (b l)) |
| 87 | (fun i j k l => D.curvatureTensor_swap_last x (b i) (b j) (b k) (b l)) U V |
| 88 | have hnonneg : 0 ≤ ∑ i, ∑ j, ∑ k, ∑ l, R i j k l * A i j * A k l := by |
| 89 | change 0 ≤ ∑ i, ∑ j, ∑ k, ∑ l, A i j * A k l * R i j k l at hop |
| 90 | convert hop using 1 |
| 91 | apply Finset.sum_congr rfl |
| 92 | intro i _ |
| 93 | apply Finset.sum_congr rfl |
| 94 | intro j _ |
| 95 | apply Finset.sum_congr rfl |
| 96 | intro k _ |
| 97 | apply Finset.sum_congr rfl |
| 98 | intro l _ |
| 99 | ring |
| 100 | dsimp only [A] at hnonneg |
| 101 | rw [heq] at hnonneg |
| 102 | rw [D.curvatureTensor_sum_frame x u v] |
| 103 | exact hnonneg |
| 104 | |
| 105 | /-- Nonnegative curvature operator implies nonnegative sectional curvature, |
| 106 | including the totalized value on a dependent pair. -/ |
| 107 | theorem sectionalCurvature_nonneg_of_nonnegative_curvatureOperator |
| 108 | (D : LeviCivitaData g) (x : M) (hoperator : D.NonnegativeCurvatureOperator x) |
| 109 | (u v : TangentSpace (𝓡 n) x) : 0 ≤ D.sectionalCurvature x u v := by |
| 110 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 111 | ⟨g.toRiemannianMetric⟩ |
| 112 | apply div_nonneg (D.curvatureTensor_self_nonneg_of_nonnegative_curvatureOperator x hoperator u v) |
| 113 | change 0 ≤ inner ℝ u u * inner ℝ v v - (inner ℝ u v) ^ 2 |
| 114 | simpa only [pow_two] using sub_nonneg.mpr (real_inner_mul_inner_self_le u v) |
| 115 | |
| 116 | end PoincareMT.LeviCivitaData |