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.RawFlow.AxisAngularRicci |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.RadialUnitRicci |
| 4 | import PoincareLib.Geometry.Riemannian.Homothety.Curvature.ContractionTransport |
| 5 | |
| 6 | local notation "M04.ricci_symm" => PoincareMT.RicciFlowAnalysis.ricci_symm |
| 7 | |
| 8 | /-! |
| 9 | # Actual Ricci form and null directions on the radial axis |
| 10 | |
| 11 | Morgan-Tian Section 12.6, pp. 307-311. The genuine rotational action |
| 12 | forces the Ricci form to have two equal angular entries and one radial |
| 13 | entry. Under nonnegative sectional curvature, a nonzero Ricci-null vector |
| 14 | therefore forces the radial sectional curvature to vanish. |
| 15 | -/ |
| 16 | |
| 17 | set_option autoImplicit false |
| 18 | set_option backward.isDefEq.respectTransparency false |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle |
| 21 | |
| 22 | namespace PoincareMT.M35.Uniqueness |
| 23 | |
| 24 | private noncomputable abbrev e (i : Fin 3) : StandardCapSpace := EuclideanSpace.single i 1 |
| 25 | |
| 26 | variable {g : RiemannianMetric 3 StandardCapSpace} (D : LeviCivitaData g) |
| 27 | (hrotation : ∀ A : Matrix.specialOrthogonalGroup (Fin 3) ℝ, |
| 28 | ∀ x u v : StandardCapSpace, |
| 29 | g.inner (standardRotation A x) |
| 30 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 31 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = g.inner x u v) |
| 32 | |
| 33 | include hrotation |
| 34 | |
| 35 | theorem rotational_axis_ricci_form (r : ℝ) (u v : StandardCapSpace) : |
| 36 | D.ricci (r • e 2) u v = |
| 37 | D.ricci (r • e 2) (e 0) (e 0) * (u 0 * v 0 + u 1 * v 1) + |
| 38 | D.ricci (r • e 2) (e 2) (e 2) * (u 2 * v 2) := by |
| 39 | let p := r • e 2 |
| 40 | let B : StandardCapSpace →ₗ[ℝ] StandardCapSpace →ₗ[ℝ] ℝ := M13.ricciLinear D p |
| 41 | have hsymm (a b : StandardCapSpace) : B a b = B b a := M04.ricci_symm D p a b |
| 42 | have hrot (s : ℝ) (a b : StandardCapSpace) : |
| 43 | B (standardRotation (coordinateRotation s) a) |
| 44 | (standardRotation (coordinateRotation s) b) = B a b := by |
| 45 | let f := standardRotationDiffeomorph (coordinateRotation s) |
| 46 | have hf : MetricHomothety g g f 1 := by |
| 47 | intro x u v |
| 48 | change g.inner (standardRotation (coordinateRotation s) x) |
| 49 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation (coordinateRotation s)) x u) |
| 50 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation (coordinateRotation s)) x v) = |
| 51 | 1 * g.inner x u v |
| 52 | simpa only [one_mul] using hrotation (coordinateRotation s) x u v |
| 53 | have hh := M13.homothety_ricci_eq g g f 1 (by norm_num) hf D D p a b |
| 54 | change D.ricci (standardRotation (coordinateRotation s) p) |
| 55 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation (coordinateRotation s)) p a) |
| 56 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation (coordinateRotation s)) p b) = _ at hh |
| 57 | rw [standardRotation_mfderiv] at hh |
| 58 | change D.ricci (standardRotation (coordinateRotation s) (r • e 2)) |
| 59 | (standardRotation (coordinateRotation s) a) |
| 60 | (standardRotation (coordinateRotation s) b) = _ at hh |
| 61 | rw [rotation_axis] at hh |
| 62 | exact hh |
| 63 | have h20 : B (e 2) (e 0) = 0 := by |
| 64 | have h := hrot Real.pi (e 2) (e 0) |
| 65 | simp only [rotation_basis_two, rotation_basis_zero, Real.cos_pi, Real.sin_pi, |
| 66 | neg_one_smul, zero_smul, add_zero, map_neg] at h |
| 67 | linarith only [h] |
| 68 | have h21 : B (e 2) (e 1) = 0 := by |
| 69 | have h := hrot Real.pi (e 2) (e 1) |
| 70 | simp only [rotation_basis_two, rotation_basis_one, Real.cos_pi, Real.sin_pi, |
| 71 | neg_zero, zero_smul, neg_one_smul, zero_add, map_neg] at h |
| 72 | linarith only [h] |
| 73 | have h01 : B (e 0) (e 1) = 0 := by |
| 74 | have h := hrot (Real.pi / 2) (e 0) (e 1) |
| 75 | simp only [rotation_basis_zero, rotation_basis_one, Real.cos_pi_div_two, |
| 76 | Real.sin_pi_div_two, zero_smul, one_smul, zero_add, neg_one_smul, add_zero, |
| 77 | map_neg, hsymm (e 1) (e 0)] at h |
| 78 | linarith only [h] |
| 79 | have h11 : B (e 1) (e 1) = B (e 0) (e 0) := by |
| 80 | have h := hrot (Real.pi / 2) (e 0) (e 0) |
| 81 | simpa only [rotation_basis_zero, Real.cos_pi_div_two, Real.sin_pi_div_two, |
| 82 | zero_smul, one_smul, zero_add] using h |
| 83 | have h02 : B (e 0) (e 2) = 0 := (hsymm _ _).trans h20 |
| 84 | have h12 : B (e 1) (e 2) = 0 := (hsymm _ _).trans h21 |
| 85 | have h10 : B (e 1) (e 0) = 0 := (hsymm _ _).trans h01 |
| 86 | have hexp (a : StandardCapSpace) : a = a 0 • e 0 + a 1 • e 1 + a 2 • e 2 := by |
| 87 | ext i |
| 88 | fin_cases i <;> simp [e, EuclideanSpace.single] |
| 89 | change B u v = B (e 0) (e 0) * _ + B (e 2) (e 2) * _ |
| 90 | calc |
| 91 | _ = B (u 0 • e 0 + u 1 • e 1 + u 2 • e 2) |
| 92 | (v 0 • e 0 + v 1 • e 1 + v 2 • e 2) := by rw [← hexp u, ← hexp v] |
| 93 | _ = _ := by |
| 94 | simp only [map_add, map_smul, LinearMap.add_apply, LinearMap.smul_apply, smul_eq_mul, |
| 95 | h20, h21, h01, h02, h12, h10, h11, mul_zero, zero_add, add_zero] |
| 96 | ring |
| 97 | |
| 98 | /-- A genuine nonzero Ricci-null direction in a nonnegative rotational |
| 99 | metric forces zero radial sectional curvature at that axis point. -/ |
| 100 | theorem radialMixedCurvatureFactor_eq_zero_of_ricci_null |
| 101 | (hsec : D.NonnegativeSectionalCurvature) {r : ℝ} (hr : 0 < r) |
| 102 | {v : StandardCapSpace} (hv : v ≠ 0) (hnull : D.ricci (r • e 2) v v = 0) : |
| 103 | radialMixedCurvatureFactor g r = 0 := by |
| 104 | have hk := radialMixedCurvatureFactor_nonneg D hrotation hsec hr |
| 105 | apply le_antisymm _ hk |
| 106 | by_contra hn |
| 107 | have hK : 0 < radialMixedCurvatureFactor g r := lt_of_not_ge hn |
| 108 | have ha : 0 ≤ radialTangentialCurvatureFactor g r := by |
| 109 | have hh := hsec (r • e 2) (e 0) (e 1) |
| 110 | rw [(rotational_sectional_numerators_axis D hrotation hr).1] at hh |
| 111 | exact nonneg_of_mul_nonneg_right hh (axisAngularCoefficient_pos g r) |
| 112 | have hangular : 0 < D.ricci (r • e 2) (e 0) (e 0) := by |
| 113 | rw [rotational_axis_angular_ricci D hrotation hr] |
| 114 | exact add_pos_of_nonneg_of_pos ha |
| 115 | (div_pos (mul_pos (axisAngularCoefficient_pos g r) hK) (axisRadialCoefficient_pos g r)) |
| 116 | have hradial : 0 < D.ricci (r • e 2) (e 2) (e 2) := by |
| 117 | rw [rotational_axis_radial_ricci D hrotation hr] |
| 118 | positivity |
| 119 | rw [rotational_axis_ricci_form D hrotation] at hnull |
| 120 | have hn01 := mul_nonneg hangular.le (add_nonneg (sq_nonneg (v 0)) (sq_nonneg (v 1))) |
| 121 | have hn2 := mul_nonneg hradial.le (sq_nonneg (v 2)) |
| 122 | have hz01 : v 0 ^ 2 + v 1 ^ 2 = 0 := by |
| 123 | apply (mul_eq_zero.mp (show D.ricci (r • e 2) (e 0) (e 0) * |
| 124 | (v 0 ^ 2 + v 1 ^ 2) = 0 by nlinarith only [hnull, hn01, hn2])).resolve_left hangular.ne' |
| 125 | have hz2sq : v 2 ^ 2 = 0 := by |
| 126 | apply (mul_eq_zero.mp (show D.ricci (r • e 2) (e 2) (e 2) * v 2 ^ 2 = 0 by |
| 127 | nlinarith only [hnull, hn01, hn2])).resolve_left hradial.ne' |
| 128 | have hz0 : v 0 = 0 := by nlinarith only [hz01, sq_nonneg (v 1)] |
| 129 | have hz1 : v 1 = 0 := by nlinarith only [hz01, sq_nonneg (v 0)] |
| 130 | have hz2 : v 2 = 0 := by nlinarith only [hz2sq] |
| 131 | apply hv |
| 132 | ext i |
| 133 | fin_cases i <;> simp [hz0, hz1, hz2] |
| 134 | |
| 135 | end PoincareMT.M35.Uniqueness |