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.Curvature.Energy.Bochner |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.ConnectionScalar |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.FixedExtension |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureAlgebra |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureSymmetries |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RicciRegularity |
| 7 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RiemannRegularity |
| 8 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.TensorDerivativeClosure |
| 9 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Energy.Bochner |
| 10 | import PoincareLib.Geometry.RicciFlow.Curvature.Calculus.Tensors.RicciRegularity |
| 11 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.ConnectionScalar |
| 12 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Fields.FixedExtension |
| 13 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureAlgebra |
| 14 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Identities.CurvatureSymmetries |
| 15 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RicciRegularity |
| 16 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Imports.Geometry.RicciFlow.Curvature.Calculus.Tensors.RiemannRegularity |
| 17 | import PoincareLib.Geometry.Riemannian.Coordinates.Exponential.JetBounds.ManifoldCurvatureSmooth |
| 18 | import PoincareLib.Geometry.Riemannian.Tensor.TraceRegularity |
| 19 | |
| 20 | /-! |
| 21 | # Regularity and compact bounds for initial curvature derivatives |
| 22 | |
| 23 | Morgan-Tian Lemma 12.3, printed pp. 294-295. Smoothness of the actual |
| 24 | iterated curvature tensor makes its geometric norm continuous, including |
| 25 | where the norm vanishes. Compactness then gives the compact-core part of |
| 26 | the estimate for every supplied standard initial metric. No exterior |
| 27 | bound or scalar positivity is assumed here. |
| 28 | -/ |
| 29 | |
| 30 | set_option autoImplicit false |
| 31 | |
| 32 | open scoped Manifold ContDiff Bundle |
| 33 | |
| 34 | namespace PoincareMT.M34 |
| 35 | |
| 36 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 37 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 38 | {g : RiemannianMetric n M} |
| 39 | |
| 40 | /-- Continuity of each actual curvature derivative norm, obtained from |
| 41 | the smooth squared norm (Lemma 12.3, pp. 294-295). -/ |
| 42 | theorem continuous_curvatureDerivativeNorm (D : LeviCivitaData g) (k : ℕ) : |
| 43 | Continuous (D.curvatureDerivativeNorm k) := by |
| 44 | have hT := D.iteratedCovariantTensorDerivative_isSmooth D.riemannEvaluation_isSmooth_manifold k |
| 45 | have h := (M04.contMDiff_tensorNorm_sq g hT).continuous.sqrt |
| 46 | convert! h using 1 |
| 47 | funext x |
| 48 | exact (Real.sqrt_sq (Real.sqrt_nonneg _)).symm |
| 49 | |
| 50 | /-- Each actual curvature derivative has a finite nonnegative bound |
| 51 | on every compact set (Lemma 12.3, pp. 294-295). -/ |
| 52 | theorem curvatureDerivativeNorm_bounded_on_compact (D : LeviCivitaData g) |
| 53 | (k : ℕ) {K : Set M} (hK : IsCompact K) : |
| 54 | ∃ C : ℝ, 0 ≤ C ∧ ∀ x ∈ K, D.curvatureDerivativeNorm k x ≤ C := by |
| 55 | obtain ⟨C, hC⟩ := hK.bddAbove_image (continuous_curvatureDerivativeNorm D k).continuousOn |
| 56 | refine ⟨max C 0, le_max_right _ _, fun x hx => ?_⟩ |
| 57 | exact (hC ⟨x, hx, rfl⟩).trans (le_max_left _ _) |
| 58 | |
| 59 | /-- The actual scalar curvature is smooth by metric contraction of the |
| 60 | smooth Ricci tensor (Lemma 12.3, pp. 294-295). -/ |
| 61 | theorem contMDiff_scalarCurvature (D : LeviCivitaData g) : |
| 62 | ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ D.scalarCurvature := by |
| 63 | intro x |
| 64 | have hT := (M04.isSmoothCovariantTensor_ricciEvaluation D).tensorTrace (g := g) |
| 65 | have h := hT.contMDiffAt_apply (x := x) (X := fun i : Fin 0 => Fin.elim0 i) |
| 66 | (fun i => Fin.elim0 i) |
| 67 | convert! h using 1 |
| 68 | |
| 69 | /-- Pointwise positive scalar curvature has one positive reciprocal lower |
| 70 | and upper bound on a compact set (Lemma 12.3, pp. 294-295). -/ |
| 71 | theorem scalarCurvature_bounds_on_compact (D : LeviCivitaData g) |
| 72 | {K : Set M} (hK : IsCompact K) |
| 73 | (hpos : ∀ x ∈ K, 0 < D.scalarCurvature x) : |
| 74 | ∃ C : ℝ, 0 < C ∧ ∀ x ∈ K, |
| 75 | C⁻¹ ≤ D.scalarCurvature x ∧ D.scalarCurvature x ≤ C := by |
| 76 | have hcont : ContinuousOn D.scalarCurvature K := |
| 77 | (contMDiff_scalarCurvature D).continuous.continuousOn |
| 78 | obtain ⟨A, hA⟩ := hK.bddAbove_image hcont |
| 79 | have hinv : ContinuousOn (fun x => (D.scalarCurvature x)⁻¹) K := |
| 80 | hcont.inv₀ (fun x hx => ne_of_gt (hpos x hx)) |
| 81 | obtain ⟨B, hB⟩ := hK.bddAbove_image hinv |
| 82 | refine ⟨max 1 (max A B), lt_of_lt_of_le zero_lt_one (le_max_left _ _), ?_⟩ |
| 83 | intro x hx |
| 84 | constructor |
| 85 | · apply (inv_le_comm₀ (lt_of_lt_of_le zero_lt_one (le_max_left _ _)) (hpos x hx)).mpr |
| 86 | exact (hB ⟨x, hx, rfl⟩).trans ((le_max_right A B).trans (le_max_right _ _)) |
| 87 | · exact (hA ⟨x, hx, rfl⟩).trans ((le_max_left A B).trans (le_max_right _ _)) |
| 88 | |
| 89 | end PoincareMT.M34 |