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.Harnack.Noncompact.CurvatureControl.ScalarEvolution |
| 2 | import PoincareLib.Geometry.Riemannian.Curvature.Scalar.Regularity |
| 3 | import PoincareLib.Geometry.Riemannian.ScalarOperators.Product |
| 4 | import PoincareLib.Geometry.Riemannian.ScalarOperators.Extrema |
| 5 | import PoincareLib.Geometry.Riemannian.ScalarOperators.Locality |
| 6 | import PoincareLib.Geometry.Manifold.ContDiff.Extension |
| 7 | |
| 8 | /-! |
| 9 | # Scalar-curvature cutoff contact estimates |
| 10 | |
| 11 | At a positive-cutoff spatial maximum, the gradient product rule eliminates |
| 12 | the mixed term in the heat operator. This gives the scalar-curvature version |
| 13 | of the cutoff calculation in Chen, Theorem 3.1, manuscript p. 11. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter |
| 20 | open scoped Manifold ContDiff Bundle |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.RicciFlow |
| 25 | |
| 26 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 28 | {J : Set ℝ} |
| 29 | |
| 30 | /-- The ordinary time derivative of a localized scalar curvature at a |
| 31 | spatial maximum, with every gradient term expressed in the cutoff. -/ |
| 32 | theorem deriv_cutoff_mul_scalarCurvature_le_at_max |
| 33 | (hC : RicciFlowCurvatureTheory.{u}) (F : RicciFlow n M J) |
| 34 | {t : ℝ} (ht : t ∈ interior J) (x : M) (φ : ℝ → M → ℝ) |
| 35 | (hφ : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ (φ t)) |
| 36 | (hφtime : DifferentiableAt ℝ (fun s => φ s x) t) |
| 37 | (hφpos : 0 < φ t x) |
| 38 | (hRic : ∀ v : TangentSpace (𝓡 n) x, 0 ≤ (F.connection t).ricci x v v) |
| 39 | (hmax : IsLocalMax (fun y => φ t y * (F.connection t).scalarCurvature y) x) : |
| 40 | deriv (fun s => φ s x * (F.connection s).scalarCurvature x) t ≤ |
| 41 | 2 * (F.connection t).scalarCurvature x * |
| 42 | (φ t x * (F.connection t).scalarCurvature x) + |
| 43 | (F.connection t).scalarCurvature x * |
| 44 | (deriv (fun s => φ s x) t - (F.connection t).laplacian (φ t) x + |
| 45 | 2 * (F.metric t).inner x ((F.connection t).gradient (φ t) x) |
| 46 | ((F.connection t).gradient (φ t) x) / φ t x) := by |
| 47 | let D := F.connection t |
| 48 | have hD := hC.tensor_calculus n M (F.metric t) D |
| 49 | have hR := hD.contMDiff_scalarCurvature |
| 50 | have hprod := hφ.mul hR |
| 51 | have hgrad := congrArg (fun A : TangentSpace (𝓡 n) x →L[ℝ] ℝ => |
| 52 | A (D.gradient (φ t) x)) (LeviCivitaData.mvfderiv_eq_zero_of_isLocalMax hprod hmax) |
| 53 | change mvfderiv (𝓡 n) (fun y => φ t y * D.scalarCurvature y) x |
| 54 | (D.gradient (φ t) x) = 0 at hgrad |
| 55 | rw [mvfderiv_fun_mul ((hφ x).mdifferentiableAt (by simp)) |
| 56 | ((hR x).mdifferentiableAt (by simp))] at hgrad |
| 57 | simp only [add_apply, smul_apply, smul_eq_mul, ← D.inner_gradient] at hgrad |
| 58 | rw [(F.metric t).symm x (D.gradient D.scalarCurvature x) (D.gradient (φ t) x)] at hgrad |
| 59 | have hlap := D.laplacian_nonpos_of_isLocalMax hprod hmax |
| 60 | change D.laplacian (fun y => φ t y * D.scalarCurvature y) x ≤ 0 at hlap |
| 61 | rw [D.laplacian_mul hφ hR x] at hlap |
| 62 | have hd := (hC.scalar_evolution n M J F t (interior_subset ht) x).hasDerivAt |
| 63 | (mem_interior_iff_mem_nhds.mp ht) |
| 64 | rw [deriv_fun_mul hφtime hd.differentiableAt, hd.deriv] |
| 65 | have hnorm := D.ricciNormSq_le_scalarCurvature_sq_of_ricci_nonneg hD x hRic |
| 66 | have hnorm' := mul_le_mul_of_nonneg_left hnorm hφpos.le |
| 67 | have hcross : |
| 68 | 2 * (F.metric t).inner x (D.gradient (φ t) x) (D.gradient D.scalarCurvature x) = |
| 69 | -(D.scalarCurvature x * (2 * (F.metric t).inner x |
| 70 | (D.gradient (φ t) x) (D.gradient (φ t) x) / φ t x)) := by |
| 71 | field_simp [ne_of_gt hφpos] |
| 72 | nlinarith |
| 73 | dsimp only [D] at hnorm' hcross hlap |
| 74 | rw [hcross] at hlap |
| 75 | nlinarith |
| 76 | |
| 77 | /-- A curvature bound and a cutoff heat bound give the linear differential |
| 78 | inequality used in the localized maximum-principle argument. -/ |
| 79 | theorem deriv_cutoff_mul_scalarCurvature_le_linear_at_max |
| 80 | (hC : RicciFlowCurvatureTheory.{u}) (F : RicciFlow n M J) |
| 81 | {t : ℝ} (ht : t ∈ interior J) (x : M) (φ : ℝ → M → ℝ) |
| 82 | (hφ : ContMDiff (𝓡 n) 𝓘(ℝ, ℝ) ∞ (φ t)) |
| 83 | (hφtime : DifferentiableAt ℝ (fun s => φ s x) t) |
| 84 | (hφpos : 0 < φ t x) |
| 85 | (hRic : ∀ v : TangentSpace (𝓡 n) x, 0 ≤ (F.connection t).ricci x v v) |
| 86 | (hmax : IsLocalMax (fun y => φ t y * (F.connection t).scalarCurvature y) x) |
| 87 | {Q A : ℝ} (hQ : (F.connection t).scalarCurvature x ≤ Q) (hA : 0 ≤ A) |
| 88 | (hcutoff : deriv (fun s => φ s x) t - (F.connection t).laplacian (φ t) x + |
| 89 | 2 * (F.metric t).inner x ((F.connection t).gradient (φ t) x) |
| 90 | ((F.connection t).gradient (φ t) x) / φ t x ≤ A) : |
| 91 | deriv (fun s => φ s x * (F.connection s).scalarCurvature x) t ≤ |
| 92 | 2 * Q * (φ t x * (F.connection t).scalarCurvature x) + Q * A := by |
| 93 | have hR : 0 ≤ (F.connection t).scalarCurvature x := |
| 94 | Finset.sum_nonneg (fun _ _ => hRic _) |
| 95 | apply (F.deriv_cutoff_mul_scalarCurvature_le_at_max |
| 96 | hC ht x φ hφ hφtime hφpos hRic hmax).trans |
| 97 | apply add_le_add |
| 98 | · exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hQ (by norm_num)) |
| 99 | (mul_nonneg hφpos.le hR) |
| 100 | · exact (mul_le_mul_of_nonneg_left hcutoff hR).trans |
| 101 | (mul_le_mul_of_nonneg_right hQ hA) |
| 102 | |
| 103 | /-- The scalar cutoff contact estimate only needs spatial smoothness on an |
| 104 | open neighborhood of the contact point. -/ |
| 105 | theorem deriv_cutoff_mul_scalarCurvature_le_at_max_on_open [T2Space M] |
| 106 | (hC : RicciFlowCurvatureTheory.{u}) (F : RicciFlow n M J) |
| 107 | {t : ℝ} (ht : t ∈ interior J) (x : M) (φ : ℝ → M → ℝ) |
| 108 | {U : Set M} (hU : IsOpen U) (hx : x ∈ U) |
| 109 | (hφ : ContMDiffOn (𝓡 n) 𝓘(ℝ, ℝ) ∞ (φ t) U) |
| 110 | (hφtime : DifferentiableAt ℝ (fun s => φ s x) t) |
| 111 | (hφpos : 0 < φ t x) |
| 112 | (hRic : ∀ v : TangentSpace (𝓡 n) x, 0 ≤ (F.connection t).ricci x v v) |
| 113 | (hmax : IsLocalMax (fun y => φ t y * (F.connection t).scalarCurvature y) x) : |
| 114 | deriv (fun s => φ s x * (F.connection s).scalarCurvature x) t ≤ |
| 115 | 2 * (F.connection t).scalarCurvature x * |
| 116 | (φ t x * (F.connection t).scalarCurvature x) + |
| 117 | (F.connection t).scalarCurvature x * |
| 118 | (deriv (fun s => φ s x) t - (F.connection t).laplacian (φ t) x + |
| 119 | 2 * (F.metric t).inner x ((F.connection t).gradient (φ t) x) |
| 120 | ((F.connection t).gradient (φ t) x) / φ t x) := by |
| 121 | obtain ⟨f, hf, heq⟩ := Poincare.Manifold.exists_contMDiff_eq_near hU hφ hx |
| 122 | -- Replace the spatial slice while preserving the entire time function at x. |
| 123 | let ψ : ℝ → M → ℝ := fun s y => φ s y + f y - φ t y |
| 124 | have hψ : ψ t = f := by |
| 125 | funext y |
| 126 | dsimp only [ψ] |
| 127 | ring |
| 128 | have hψx (s : ℝ) : ψ s x = φ s x := by |
| 129 | dsimp only [ψ] |
| 130 | rw [heq.self_of_nhds] |
| 131 | ring |
| 132 | have hlocal : IsLocalMax |
| 133 | (fun y => ψ t y * (F.connection t).scalarCurvature y) x := by |
| 134 | apply hmax.congr |
| 135 | filter_upwards [heq] with y hy |
| 136 | rw [hψ, hy] |
| 137 | have hgrad : (F.connection t).gradient f x = (F.connection t).gradient (φ t) x := by |
| 138 | unfold LeviCivitaData.gradient |
| 139 | rw [Poincare.mvfderiv_eq_of_eventuallyEq heq] |
| 140 | have h := F.deriv_cutoff_mul_scalarCurvature_le_at_max hC ht x ψ |
| 141 | (by simpa only [hψ] using hf) |
| 142 | (by simpa only [hψx] using hφtime) |
| 143 | (by simpa only [hψx] using hφpos) hRic hlocal |
| 144 | simpa only [hψx, hψ, hgrad, |
| 145 | (F.connection t).laplacian_eq_of_eventuallyEq heq] using h |
| 146 | |
| 147 | /-- The linear cutoff contact estimate for a cutoff smooth only near the |
| 148 | contact point. -/ |
| 149 | theorem deriv_cutoff_mul_scalarCurvature_le_linear_at_max_on_open [T2Space M] |
| 150 | (hC : RicciFlowCurvatureTheory.{u}) (F : RicciFlow n M J) |
| 151 | {t : ℝ} (ht : t ∈ interior J) (x : M) (φ : ℝ → M → ℝ) |
| 152 | {U : Set M} (hU : IsOpen U) (hx : x ∈ U) |
| 153 | (hφ : ContMDiffOn (𝓡 n) 𝓘(ℝ, ℝ) ∞ (φ t) U) |
| 154 | (hφtime : DifferentiableAt ℝ (fun s => φ s x) t) |
| 155 | (hφpos : 0 < φ t x) |
| 156 | (hRic : ∀ v : TangentSpace (𝓡 n) x, 0 ≤ (F.connection t).ricci x v v) |
| 157 | (hmax : IsLocalMax (fun y => φ t y * (F.connection t).scalarCurvature y) x) |
| 158 | {Q A : ℝ} (hQ : (F.connection t).scalarCurvature x ≤ Q) (hA : 0 ≤ A) |
| 159 | (hcutoff : deriv (fun s => φ s x) t - (F.connection t).laplacian (φ t) x + |
| 160 | 2 * (F.metric t).inner x ((F.connection t).gradient (φ t) x) |
| 161 | ((F.connection t).gradient (φ t) x) / φ t x ≤ A) : |
| 162 | deriv (fun s => φ s x * (F.connection s).scalarCurvature x) t ≤ |
| 163 | 2 * Q * (φ t x * (F.connection t).scalarCurvature x) + Q * A := by |
| 164 | have hR : 0 ≤ (F.connection t).scalarCurvature x := |
| 165 | Finset.sum_nonneg (fun _ _ => hRic _) |
| 166 | apply (F.deriv_cutoff_mul_scalarCurvature_le_at_max_on_open |
| 167 | hC ht x φ hU hx hφ hφtime hφpos hRic hmax).trans |
| 168 | apply add_le_add |
| 169 | · exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hQ (by norm_num)) |
| 170 | (mul_nonneg hφpos.le hR) |
| 171 | · exact (mul_le_mul_of_nonneg_left hcutoff hR).trans |
| 172 | (mul_le_mul_of_nonneg_right hQ hA) |
| 173 | |
| 174 | end PoincareMT.RicciFlow |