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.ReducedGeometry.ReducedLength.Tensor.RicciDerivative |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Tensor.TensorEvaluationBound |
| 3 | |
| 4 | /-! |
| 5 | # Scalar differential bound from the curvature derivative |
| 6 | |
| 7 | The two metric contractions contribute the dimension factor `n^2`. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | |
| 12 | open scoped Manifold ContDiff Bundle BigOperators RealInnerProductSpace |
| 13 | |
| 14 | universe u |
| 15 | |
| 16 | namespace PoincareMT.ReducedLength |
| 17 | |
| 18 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 19 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 20 | [IsManifold (𝓡 n) ∞ M] |
| 21 | |
| 22 | theorem scalarCurvature_mvfderiv_abs_le (hM04 : RicciFlowCurvatureTheory.{u}) |
| 23 | (g : RiemannianMetric n M) (D : LeviCivitaData g) (p : M) |
| 24 | (X : TangentSpace (𝓡 n) p) : |
| 25 | |mvfderiv (𝓡 n) D.scalarCurvature p X| ≤ |
| 26 | (n : ℝ) ^ 2 * D.curvatureDerivativeNorm 1 p * g.tangentNorm p X := by |
| 27 | classical |
| 28 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 29 | ⟨g.toRiemannianMetric⟩ |
| 30 | let b := g.orthonormalBasis p |
| 31 | have hb (i : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) p))) : |
| 32 | g.tangentNorm p (b i) = 1 := by |
| 33 | change Real.sqrt ⟪b i, b i⟫ = 1 |
| 34 | rw [← norm_eq_sqrt_real_inner, b.norm_eq_one] |
| 35 | have hcalc := hM04.tensor_calculus n M g D |
| 36 | have hDR := hcalc.2.2.1 4 D.riemannEvaluation hcalc.1 |
| 37 | have hterm (i j : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) p))) : |
| 38 | |D.covariantTensorDerivative D.riemannEvaluation p ![X, b i, b j, b i, b j]| ≤ |
| 39 | D.curvatureDerivativeNorm 1 p * g.tangentNorm p X := by |
| 40 | have h := tensor_abs_le_tensorNorm g (D.covariantTensorDerivative D.riemannEvaluation) |
| 41 | hDR p ![X, b i, b j, b i, b j] |
| 42 | simpa [LeviCivitaData.curvatureDerivativeNorm, |
| 43 | LeviCivitaData.iteratedCovariantTensorDerivative, Fin.prod_univ_succ, hb] using h |
| 44 | have hdim : Module.finrank ℝ (TangentSpace (𝓡 n) p) = n := by |
| 45 | change Module.finrank ℝ (EuclideanSpace ℝ (Fin n)) = n |
| 46 | simp |
| 47 | rw [scalarCurvature_mvfderiv_contraction hM04 D] |
| 48 | calc |
| 49 | _ ≤ ∑ i, |∑ j, D.covariantTensorDerivative D.riemannEvaluation p |
| 50 | ![X, b i, b j, b i, b j]| := Finset.abs_sum_le_sum_abs _ _ |
| 51 | _ ≤ ∑ i, ∑ j, |D.covariantTensorDerivative D.riemannEvaluation p |
| 52 | ![X, b i, b j, b i, b j]| := |
| 53 | Finset.sum_le_sum fun i _ ↦ Finset.abs_sum_le_sum_abs _ _ |
| 54 | _ ≤ ∑ _i : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) p)), |
| 55 | ∑ _j : Fin (Module.finrank ℝ (TangentSpace (𝓡 n) p)), |
| 56 | D.curvatureDerivativeNorm 1 p * g.tangentNorm p X := |
| 57 | Finset.sum_le_sum fun i _ ↦ Finset.sum_le_sum fun j _ ↦ hterm i j |
| 58 | _ = _ := by simp [hdim, pow_two, mul_assoc] |
| 59 | |
| 60 | end PoincareMT.ReducedLength |