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.TerminalBlowup.RadialCurvature |
| 3 | |
| 4 | /-! |
| 5 | # The actual scalar trace in radial form |
| 6 | |
| 7 | Morgan-Tian Section 12.6, pp. 307-309. The actual axis coordinate frame |
| 8 | is orthogonal, with two angular weights a and radial weight b. Tracing |
| 9 | the retained curvature twice with the inverse Gram matrix gives |
| 10 | 2 K_tan + 4 K_rad, before expressing those factors in arclength. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle BigOperators |
| 17 | |
| 18 | namespace PoincareMT.M35.Uniqueness |
| 19 | |
| 20 | private noncomputable abbrev e (i : Fin 3) : StandardCapSpace := EuclideanSpace.single i 1 |
| 21 | |
| 22 | /-- Section 12.6: the actual retained scalar is the sum of two angular |
| 23 | and four radial sectional curvatures in the genuine rotational metric. -/ |
| 24 | theorem rotational_scalar_axis |
| 25 | {g : RiemannianMetric 3 StandardCapSpace} (D : LeviCivitaData g) |
| 26 | (hrotation : ∀ A : Matrix.specialOrthogonalGroup (Fin 3) ℝ, |
| 27 | ∀ x u v : StandardCapSpace, |
| 28 | g.inner (standardRotation A x) |
| 29 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 30 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = g.inner x u v) |
| 31 | {r : ℝ} (hr : 0 < r) : |
| 32 | D.scalarCurvature (r • e 2) = |
| 33 | 2 * radialTangentialCurvatureFactor g r / axisAngularCoefficient g r + |
| 34 | 4 * radialMixedCurvatureFactor g r / axisRadialCoefficient g r := by |
| 35 | let p := r • e 2 |
| 36 | let w : Fin 3 → ℝ := |
| 37 | ![axisAngularCoefficient g r, axisAngularCoefficient g r, axisRadialCoefficient g r] |
| 38 | let b : Module.Basis (Fin 3) ℝ (TangentSpace (𝓡 3) p) := |
| 39 | (EuclideanSpace.basisFun (Fin 3) ℝ).toBasis |
| 40 | have hb (i : Fin 3) : b i = e i := EuclideanSpace.basisFun_apply (Fin 3) ℝ i |
| 41 | have hgram : Matrix.of (fun i j : Fin 3 => g.inner p (b i) (b j)) = |
| 42 | Matrix.diagonal w := by |
| 43 | ext i j |
| 44 | simp only [Matrix.of_apply, p, hb, rotational_axis_metric g hrotation] |
| 45 | fin_cases i <;> fin_cases j <;> simp [e, w, Matrix.diagonal] |
| 46 | have hw (i : Fin 3) : w i ≠ 0 := by |
| 47 | fin_cases i |
| 48 | · exact (axisAngularCoefficient_pos g r).ne' |
| 49 | · exact (axisAngularCoefficient_pos g r).ne' |
| 50 | · exact (axisRadialCoefficient_pos g r).ne' |
| 51 | have hunit : IsUnit w := Pi.isUnit_iff.mpr (fun i => isUnit_iff_ne_zero.mpr (hw i)) |
| 52 | have hinv (i : Fin 3) : Ring.inverse w i = (w i)⁻¹ := by |
| 53 | have h := congrFun (Ring.inverse_mul_cancel w hunit) i |
| 54 | rw [← one_div] |
| 55 | exact (eq_div_iff (hw i)).mpr h |
| 56 | obtain ⟨A, hA⟩ := D.exists_multilinear_curvatureTensor p |
| 57 | have hricci (i : Fin 3) : D.ricci p (b i) (b i) = |
| 58 | ∑ j : Fin 3, (w j)⁻¹ * D.curvatureTensor p (b i) (b j) (b i) (b j) := by |
| 59 | rw [D.ricci_eq_inverse_gram p b A hA (b i) (b i), hgram, Matrix.inv_diagonal] |
| 60 | simp only [Matrix.diagonal_apply, ite_mul, zero_mul, |
| 61 | Finset.sum_ite_eq, Finset.mem_univ, if_true, hinv] |
| 62 | have hscalar := scalarCurvature_eq_inverse_gram D p b |
| 63 | rw [hgram, Matrix.inv_diagonal] at hscalar |
| 64 | simp only [Matrix.diagonal_apply, ite_mul, zero_mul, |
| 65 | Finset.sum_ite_eq, Finset.mem_univ, if_true, hinv] at hscalar |
| 66 | simp_rw [hricci] at hscalar |
| 67 | obtain ⟨h01, h02, h12⟩ := rotational_sectional_numerators_axis D hrotation hr |
| 68 | have h10 := (D.curvatureTensor_diagonal_pair_swap p (e 1) (e 0)).trans h01 |
| 69 | have h20 := (D.curvatureTensor_diagonal_pair_swap p (e 2) (e 0)).trans h02 |
| 70 | have h21 := (D.curvatureTensor_diagonal_pair_swap p (e 2) (e 1)).trans h12 |
| 71 | simp only [hb, Fin.sum_univ_succ, Fin.sum_univ_zero] at hscalar |
| 72 | erw [h01, h02, h12, h10, h20, h21] at hscalar |
| 73 | simp only [D.curvatureTensor_zero_first, mul_zero, add_zero, zero_add] at hscalar |
| 74 | rw [hscalar] |
| 75 | simp only [w, Matrix.cons_val_zero, Matrix.cons_val_succ] |
| 76 | field_simp [(axisAngularCoefficient_pos g r).ne', (axisRadialCoefficient_pos g r).ne'] |
| 77 | ring |
| 78 | |
| 79 | /-- Section 12.6: nonnegative sectional curvature makes the actual |
| 80 | radial curvature factor nonnegative, without any scalar assumption. -/ |
| 81 | theorem radialMixedCurvatureFactor_nonneg |
| 82 | {g : RiemannianMetric 3 StandardCapSpace} (D : LeviCivitaData g) |
| 83 | (hrotation : ∀ A : Matrix.specialOrthogonalGroup (Fin 3) ℝ, |
| 84 | ∀ x u v : StandardCapSpace, |
| 85 | g.inner (standardRotation A x) |
| 86 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x u) |
| 87 | (mfderiv (𝓡 3) (𝓡 3) (standardRotation A) x v) = g.inner x u v) |
| 88 | (hsec : D.NonnegativeSectionalCurvature) {r : ℝ} (hr : 0 < r) : |
| 89 | 0 ≤ radialMixedCurvatureFactor g r := by |
| 90 | have h := hsec (r • e 2) (e 0) (e 2) |
| 91 | rw [(rotational_sectional_numerators_axis D hrotation hr).2.1] at h |
| 92 | exact nonneg_of_mul_nonneg_right h (axisAngularCoefficient_pos g r) |
| 93 | |
| 94 | end PoincareMT.M35.Uniqueness |