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.CanonicalInduction.Positive.PositiveGradientQuotient |
| 2 | |
| 3 | /-! |
| 4 | # Pointwise gradient and reaction bounds in positive curvature |
| 5 | |
| 6 | Tensor Kato and the positive Ricci spectrum control the cross-gradient |
| 7 | and quartic reaction terms of Hamilton's scalar-gradient barrier. |
| 8 | These are the pointwise estimates in Hamilton (1982), Section 11, |
| 9 | supporting Morgan--Tian, Theorem 4.23, pp. 74-75. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | -- Intrinsic tensor contractions use the same metric tangent-fiber instances. |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle BigOperators |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47Positive |
| 21 | |
| 22 | section GeneralDimension |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | {g : RiemannianMetric n M} |
| 27 | |
| 28 | /-- Tensor Kato and the nonnegative square of `gradient S - 2R gradient R` |
| 29 | give the cross-gradient estimate in Hamilton (1982), Section 11, used by |
| 30 | Morgan--Tian, Theorem 4.23, pp. 74-75. -/ |
| 31 | theorem scalar_ricci_gradient_pairing_le (D : LeviCivitaData g) |
| 32 | (hD : D.CurvatureTensorCalculus) (x : M) |
| 33 | (hR : 0 < D.scalarCurvature x) |
| 34 | (hS : D.ricciNormSq x ≤ D.scalarCurvature x ^ 2) : |
| 35 | g.inner x (D.gradient D.scalarCurvature x) (D.gradient D.ricciNormSq x) ≤ |
| 36 | D.scalarCurvature x * |
| 37 | ((∑ k, ∑ i, ∑ j, (D.covariantTensorDerivative D.ricciEvaluation x |
| 38 | ![g.orthonormalBasis x k, g.orthonormalBasis x i, g.orthonormalBasis x j]) ^ 2) + |
| 39 | g.inner x (D.gradient D.scalarCurvature x) (D.gradient D.scalarCurvature x)) := by |
| 40 | let R := D.scalarCurvature x |
| 41 | let S := D.ricciNormSq x |
| 42 | let A := ∑ k, ∑ i, ∑ j, (D.covariantTensorDerivative D.ricciEvaluation x |
| 43 | ![g.orthonormalBasis x k, g.orthonormalBasis x i, g.orthonormalBasis x j]) ^ 2 |
| 44 | let v := D.gradient D.scalarCurvature x |
| 45 | let w := D.gradient D.ricciNormSq x |
| 46 | have hA : 0 ≤ A := Finset.sum_nonneg fun _ _ => Finset.sum_nonneg fun _ _ => |
| 47 | Finset.sum_nonneg fun _ _ => sq_nonneg _ |
| 48 | have hpair : g.tensorPairingTwo D.ricciEvaluation D.ricciEvaluation = D.ricciNormSq := by |
| 49 | funext y |
| 50 | simp only [RiemannianMetric.tensorPairingTwo, LeviCivitaData.ricciNormSq, |
| 51 | LeviCivitaData.ricciEvaluation, Matrix.cons_val_zero, Matrix.cons_val_one, pow_two] |
| 52 | have hK := D.gradient_tensor_normSq_le hD.2.1 x |
| 53 | dsimp only at hK |
| 54 | rw [hpair] at hK |
| 55 | have hK' : g.inner x w w ≤ 4 * S * A := by |
| 56 | simpa only [RiemannianMetric.tensorPairingThree, ← pow_two] using hK |
| 57 | have hSA := mul_le_mul_of_nonneg_right hS hA |
| 58 | have hsq : 0 ≤ g.inner x (w - (2 * R) • v) (w - (2 * R) • v) := by |
| 59 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 60 | ⟨g.toRiemannianMetric⟩ |
| 61 | change 0 ≤ inner ℝ (w - (2 * R) • v) (w - (2 * R) • v) |
| 62 | exact real_inner_self_nonneg |
| 63 | have hid : g.inner x (w - (2 * R) • v) (w - (2 * R) • v) = |
| 64 | g.inner x w w - 4 * R * g.inner x v w + 4 * R ^ 2 * g.inner x v v := by |
| 65 | simp only [map_sub, sub_apply, map_smul, smul_apply, smul_eq_mul] |
| 66 | rw [g.symm x w v] |
| 67 | ring |
| 68 | rw [hid] at hsq |
| 69 | have hmul : (4 * R) * (g.inner x v w - R * (A + g.inner x v v)) ≤ 0 := by |
| 70 | change S * A ≤ R ^ 2 * A at hSA |
| 71 | nlinarith only [hK', hSA, hsq] |
| 72 | exact sub_nonpos.mp (nonpos_of_mul_nonpos_right hmul (mul_pos (by norm_num) hR)) |
| 73 | |
| 74 | end GeneralDimension |
| 75 | |
| 76 | variable {M : Type u} [TopologicalSpace M] |
| 77 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 78 | [T2Space M] {g : RiemannianMetric 3 M} |
| 79 | |
| 80 | /-- Nonnegative metric-unit Ricci curvature bounds its actual squared |
| 81 | norm between `R^2/3` and `R^2`. This spectral estimate is used in the |
| 82 | gradient argument of Morgan--Tian, Theorem 4.23, pp. 74-75. -/ |
| 83 | theorem ricci_norm_bounds_of_nonneg (D : LeviCivitaData g) |
| 84 | (hD : D.CurvatureTensorCalculus) (x : M) |
| 85 | (hRic : ∀ v : TangentSpace (𝓡 3) x, g.inner x v v = 1 → 0 ≤ D.ricci x v v) : |
| 86 | D.scalarCurvature x ^ 2 / 3 ≤ D.ricciNormSq x ∧ |
| 87 | D.ricciNormSq x ≤ D.scalarCurvature x ^ 2 := by |
| 88 | obtain ⟨a, b, c, hab, hbc, hc, hscalar, hnorm, _⟩ := |
| 89 | exists_pinched_ricci_spectrum D hD x (delta := 0) (by simpa using hRic) |
| 90 | have hc0 : 0 ≤ c := by simpa using hc |
| 91 | have hb0 : 0 ≤ b := hc0.trans hbc |
| 92 | have ha0 : 0 ≤ a := hb0.trans hab |
| 93 | rw [hscalar, hnorm] |
| 94 | constructor |
| 95 | · exact sub_nonneg.mp (Poincare.ThreeDimensionalRicciPinching.traceFreeNormSq_nonneg a b c) |
| 96 | · nlinarith only [mul_nonneg ha0 hb0, mul_nonneg ha0 hc0, mul_nonneg hb0 hc0] |
| 97 | |
| 98 | /-- Hamilton's quartic controls the actual trace-free Ricci reaction by |
| 99 | `4R(S-R^2/3)` under positive scalar and nonnegative Ricci curvature. |
| 100 | This is the reaction step in Hamilton (1982), Section 11, supporting |
| 101 | Morgan--Tian, Theorem 4.23, pp. 74-75. -/ |
| 102 | theorem ricci_defect_reaction_le (D : LeviCivitaData g) |
| 103 | (hD : D.CurvatureTensorCalculus) (x : M) (hR : 0 < D.scalarCurvature x) |
| 104 | (hRic : ∀ v : TangentSpace (𝓡 3) x, g.inner x v v = 1 → 0 ≤ D.ricci x v v) : |
| 105 | 4 * (∑ i, ∑ j, D.ricci x (g.orthonormalBasis x i) (g.orthonormalBasis x j) * |
| 106 | (∑ a, ∑ c, D.curvatureTensor x (g.orthonormalBasis x i) |
| 107 | (g.orthonormalBasis x a) (g.orthonormalBasis x j) (g.orthonormalBasis x c) * |
| 108 | D.ricci x (g.orthonormalBasis x a) (g.orthonormalBasis x c))) - |
| 109 | (4 / 3) * D.scalarCurvature x * D.ricciNormSq x ≤ |
| 110 | 4 * D.scalarCurvature x * (D.ricciNormSq x - D.scalarCurvature x ^ 2 / 3) := by |
| 111 | have hnorm := ricci_norm_bounds_of_nonneg D hD x hRic |
| 112 | have hP := weighted_ricci_reaction_nonpos D hD x (delta := 0) (epsilon := 0) |
| 113 | (by norm_num) hR (by simpa using hRic) (by norm_num) |
| 114 | simp only [zero_mul, zero_sub, neg_nonpos] at hP |
| 115 | have hprod := mul_le_mul_of_nonneg_right hnorm.2 (sub_nonneg.mpr hnorm.1) |
| 116 | apply (mul_le_mul_iff_right₀ hR).mp |
| 117 | nlinarith only [hP, hprod] |
| 118 | |
| 119 | end PoincareMT.M47Positive |