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.TimeTranslation |
| 2 | import PoincareLib.Geometry.RicciFlow.Curvature.Estimates.Local |
| 3 | import PoincareLib.Geometry.RicciFlow.Compactness.LocalGeometry |
| 4 | import PoincareLib.Geometry.Riemannian.Curvature.NormBounds |
| 5 | |
| 6 | /-! |
| 7 | # Initial-slice derivative control |
| 8 | |
| 9 | The M04 local Shi estimate is a positive-time estimate. Translating a short |
| 10 | interval ending at the original zero slice turns it into an estimate at time |
| 11 | zero, while the two-time curvature hypothesis supplies the required earlier |
| 12 | slice compactness and curvature bound. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option maxHeartbeats 800000 |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | namespace PoincareMT.PointedRicciFlowCompactnessHypotheses |
| 21 | |
| 22 | open Set |
| 23 | |
| 24 | theorem eventually_zero_time_curvatureDerivativeNorm_le_of_local_derivative_estimates |
| 25 | {n : ℕ} {T' T : ℝ} |
| 26 | (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 27 | (hShi : LocalCurvatureDerivativeEstimates.{0}) |
| 28 | (A : ℝ) (hA : 0 < A) (m : ℕ) : |
| 29 | ∃ D : ℝ, 0 < D ∧ ∀ᶠ k in Filter.atTop, |
| 30 | let C := H.sequence.carrier k |
| 31 | let F := H.sequence.flow k |
| 32 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 33 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 34 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 35 | ∀ x ∈ F.zeroBall A, |
| 36 | (F.flow.connection 0).curvatureDerivativeNorm m x ≤ D := by |
| 37 | obtain ⟨KA, hKA, hAevent⟩ := H.all_time_curvature_control A hA |
| 38 | obtain ⟨K4, hK4, h4event⟩ := H.all_time_curvature_control (4 * A) (by positivity) |
| 39 | let LA : ℝ := (n : ℝ) ^ 3 * KA |
| 40 | let K0 : ℝ := K4 + 1 |
| 41 | let l2 : ℝ := Real.log 2 |
| 42 | let q : ℝ := min (-T') (min T (min (1 / K0) (l2 / (LA + 1)))) |
| 43 | let δ : ℝ := q / 2 |
| 44 | have hK0 : 0 < K0 := by dsimp [K0]; linarith |
| 45 | have hl2 : 0 < l2 := Real.log_pos (by norm_num) |
| 46 | have hT' : T' < 0 := H.time_bounds.1 |
| 47 | have hT : 0 < T := H.time_bounds.2 |
| 48 | have hLA : 0 ≤ LA := by |
| 49 | dsimp [LA] |
| 50 | positivity |
| 51 | have hq : 0 < q := by |
| 52 | dsimp [q] |
| 53 | refine lt_min (by linarith) (lt_min hT (lt_min (by positivity) (by positivity))) |
| 54 | have hδ : 0 < δ := by dsimp [δ]; linarith |
| 55 | have hδT' : δ < -T' := by |
| 56 | have hq' : q ≤ -T' := min_le_left _ _ |
| 57 | dsimp [δ] |
| 58 | linarith |
| 59 | have hδT : δ < T := by |
| 60 | have hq' : q ≤ T := by |
| 61 | dsimp [q] |
| 62 | exact le_trans (min_le_right _ _) (min_le_left _ _) |
| 63 | dsimp [δ] |
| 64 | linarith |
| 65 | have hδK : δ ≤ 1 / K0 := by |
| 66 | have hq' : q ≤ 1 / K0 := by |
| 67 | dsimp [q] |
| 68 | exact le_trans (min_le_right _ _) (le_trans (min_le_right _ _) (min_le_left _ _)) |
| 69 | dsimp [δ] |
| 70 | linarith |
| 71 | have hδL : LA * δ ≤ l2 := by |
| 72 | have hq' : q ≤ l2 / (LA + 1) := by |
| 73 | dsimp [q] |
| 74 | exact le_trans (min_le_right _ _) (le_trans (min_le_right _ _) (min_le_right _ _)) |
| 75 | have hqbound : LA * q ≤ l2 := by |
| 76 | calc |
| 77 | LA * q ≤ LA * (l2 / (LA + 1)) := |
| 78 | mul_le_mul_of_nonneg_left hq' hLA |
| 79 | _ ≤ l2 := by |
| 80 | calc |
| 81 | LA * (l2 / (LA + 1)) ≤ (LA + 1) * (l2 / (LA + 1)) := by |
| 82 | gcongr |
| 83 | linarith |
| 84 | _ = l2 := by field_simp |
| 85 | dsimp [δ] |
| 86 | nlinarith |
| 87 | obtain ⟨Cderiv, hCderiv, hShi⟩ := |
| 88 | hShi n m K0 1 (4 * A) |
| 89 | (by linarith) (by norm_num) (by linarith) |
| 90 | refine ⟨Cderiv / δ ^ ((m : ℝ) / 2), by positivity, ?_⟩ |
| 91 | filter_upwards [hAevent, h4event, H.eventually_all_time_ball_compact (4 * A) (by positivity)] |
| 92 | with k hkA hk4 hkcompact |
| 93 | let C := H.sequence.carrier k |
| 94 | let F := H.sequence.flow k |
| 95 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 96 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 97 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 98 | letI : T2Space C.carrier := C.t2Space |
| 99 | letI : SecondCountableTopology C.carrier := C.secondCountable |
| 100 | have hshift : (fun t : ℝ ↦ t + (-δ)) '' Icc 0 δ ⊆ Ioo T' T := by |
| 101 | rintro _ ⟨t, ht, rfl⟩ |
| 102 | constructor <;> dsimp |
| 103 | · linarith [ht.1] |
| 104 | · linarith [ht.2] |
| 105 | have hneIcc : (Icc (0 : ℝ) δ).Nontrivial := by |
| 106 | exact ⟨0, ⟨le_rfl, hδ.le⟩, δ, ⟨hδ.le, le_rfl⟩, (ne_of_gt hδ).symm⟩ |
| 107 | let Ft := PoincareMT.RicciFlow.translate F.flow (-δ) hshift |
| 108 | Set.ordConnected_Icc hneIcc |
| 109 | have hcompact : IsCompact (closure ((Ft.metric 0).ball F.base (4 * A))) := by |
| 110 | rw [PoincareMT.RicciFlow.translate_metric F.flow (-δ) hshift |
| 111 | Set.ordConnected_Icc hneIcc 0] |
| 112 | simpa only [BasedFlow.ballAt, FlowCarrier.metricBall, zero_add] using |
| 113 | hkcompact (-δ) ⟨by linarith, by linarith⟩ |
| 114 | have hcurv : ∀ t ∈ Icc 0 δ, ∀ x ∈ (Ft.metric 0).ball F.base (4 * A), |
| 115 | (Ft.connection t).curvatureTensorNorm x ≤ K0 := by |
| 116 | intro t ht x hx |
| 117 | have htx : x ∈ F.ballAt (-δ) (4 * A) := by |
| 118 | change x ∈ (F.flow.metric (-δ)).ball F.base (4 * A) |
| 119 | simpa [Ft, PoincareMT.RicciFlow.translate] using hx |
| 120 | exact le_trans (hk4 (-δ) ⟨by linarith, by linarith⟩ (t + (-δ)) |
| 121 | (hshift ⟨t, ht, rfl⟩) x htx) (by linarith) |
| 122 | have htime := hShi C.carrier δ hδ hδK Ft F.base hcompact hcurv |
| 123 | have hderiv := htime δ ⟨by linarith, le_rfl⟩ |
| 124 | change ∀ x : C.carrier, x ∈ F.zeroBall A → |
| 125 | (F.flow.connection 0).curvatureDerivativeNorm m x ≤ Cderiv / δ ^ ((m : ℝ) / 2) |
| 126 | intro x hx |
| 127 | change x ∈ (F.flow.metric 0).ball F.base A at hx |
| 128 | have hRic : ∀ τ ∈ Ioo T' T, ∀ y ∈ F.zeroBall A, |
| 129 | ∀ v : C.tangent y, |
| 130 | |(F.flow.connection τ).ricci y v v| ≤ LA * (F.flow.metric τ).inner y v v := by |
| 131 | intro τ hτ y hy v |
| 132 | have hQ : 0 ≤ (F.flow.metric τ).inner y v v := by |
| 133 | by_cases hv : v = 0 |
| 134 | · subst v; simp |
| 135 | · exact ((F.flow.metric τ).pos y v hv).le |
| 136 | have hnorm := (F.flow.connection τ).abs_ricci_quadratic_le_curvatureTensorNorm y v |
| 137 | have hdim : Module.finrank ℝ (TangentSpace (𝓡 n) y) = n := finrank_euclideanSpace_fin |
| 138 | simp only [Fintype.card_fin, hdim] at hnorm |
| 139 | exact hnorm.trans (mul_le_mul_of_nonneg_right |
| 140 | (mul_le_mul_of_nonneg_left (hkA 0 ⟨H.time_bounds.1, H.time_bounds.2⟩ τ hτ y hy) |
| 141 | (by positivity)) hQ) |
| 142 | have hball := F.flow.ball_subset_ball_of_ricci_bound (convex_Ioo T' T) |
| 143 | (Set.Subset.refl _) F.base A LA (s := 0) (t := -δ) |
| 144 | ⟨by linarith, by linarith⟩ ⟨by linarith, by linarith⟩ hRic |
| 145 | have hx2 : x ∈ (F.flow.metric (-δ)).ball F.base (2 * A) := by |
| 146 | have hx' := hball hx |
| 147 | change (F.flow.metric (-δ)).edist F.base x < ENNReal.ofReal (2 * A) |
| 148 | change x ∈ (F.flow.metric 0).ball F.base A at hx |
| 149 | have hexp : Real.exp (LA * δ) ≤ 2 := by |
| 150 | rw [← Real.exp_log (by norm_num : (0 : ℝ) < 2)] |
| 151 | exact Real.exp_le_exp.mpr hδL |
| 152 | have hrad : Real.exp (LA * δ) * A ≤ 2 * A := by nlinarith |
| 153 | have habs : |-δ - 0| = δ := by |
| 154 | simp [abs_of_neg (by linarith : -δ < 0)] |
| 155 | rw [habs] at hx' |
| 156 | exact lt_of_lt_of_le hx' (ENNReal.ofReal_le_ofReal hrad) |
| 157 | have hx2' : x ∈ (Ft.metric 0).ball F.base (4 * A / 2) := by |
| 158 | rw [PoincareMT.RicciFlow.translate_metric F.flow (-δ) hshift |
| 159 | Set.ordConnected_Icc hneIcc 0] |
| 160 | convert hx2 using 1 <;> ring |
| 161 | have h := hderiv x hx2' |
| 162 | have hnorm : (Ft.connection δ).curvatureDerivativeNorm m x = |
| 163 | (F.flow.connection 0).curvatureDerivativeNorm m x := by |
| 164 | change (F.flow.connection (δ + -δ)).curvatureDerivativeNorm m x = |
| 165 | (F.flow.connection 0).curvatureDerivativeNorm m x |
| 166 | rw [add_neg_cancel] |
| 167 | rw [hnorm] at h |
| 168 | exact h |
| 169 | |
| 170 | /-- The supplied curvature theory gives the zero-time derivative bounds. -/ |
| 171 | theorem eventually_zero_time_curvatureDerivativeNorm_le |
| 172 | {n : ℕ} {T' T : ℝ} |
| 173 | (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 174 | (hM04 : RicciFlowCurvatureTheory.{0}) |
| 175 | (A : ℝ) (hA : 0 < A) (m : ℕ) : |
| 176 | ∃ D : ℝ, 0 < D ∧ ∀ᶠ k in Filter.atTop, |
| 177 | let C := H.sequence.carrier k |
| 178 | let F := H.sequence.flow k |
| 179 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 180 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 181 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 182 | ∀ x ∈ F.zeroBall A, |
| 183 | (F.flow.connection 0).curvatureDerivativeNorm m x ≤ D := |
| 184 | H.eventually_zero_time_curvatureDerivativeNorm_le_of_local_derivative_estimates |
| 185 | hM04.local_derivative_estimates A hA m |
| 186 | |
| 187 | end PoincareMT.PointedRicciFlowCompactnessHypotheses |