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.Compactness.Limit.DerivativeBounds |
| 2 | |
| 3 | /-! |
| 4 | # Curvature derivative bounds on compact interior time sets |
| 5 | |
| 6 | The compact-time form of the interior Shi estimate follows from the checked |
| 7 | closed-interval estimate by placing a compact subset of the time interval |
| 8 | between strictly interior endpoints. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxHeartbeats 800000 |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 15 | |
| 16 | namespace PoincareMT.PointedRicciFlowCompactnessHypotheses |
| 17 | |
| 18 | open Set |
| 19 | |
| 20 | /-- Uniform curvature derivative bounds on a compact subset of the interior, |
| 21 | measured on the fixed zero-time ball. -/ |
| 22 | theorem eventually_compact_curvatureDerivativeNorm_le_of_local_derivative_estimates |
| 23 | {n : ℕ} {T' T : ℝ} |
| 24 | (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 25 | (hShi : LocalCurvatureDerivativeEstimates.{0}) |
| 26 | {I : Set ℝ} (hIcompact : IsCompact I) (hI : I ⊆ Ioo T' T) |
| 27 | (A : ℝ) (hA : 0 < A) (m : ℕ) : |
| 28 | ∃ D : ℝ, 0 < D ∧ ∀ᶠ k in Filter.atTop, |
| 29 | let C := H.sequence.carrier k |
| 30 | let F := H.sequence.flow k |
| 31 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 32 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 33 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 34 | ∀ t ∈ I, ∀ x ∈ F.zeroBall A, |
| 35 | (F.flow.connection t).curvatureDerivativeNorm m x ≤ D := by |
| 36 | rcases eq_empty_or_nonempty I with rfl | hInonempty |
| 37 | · refine ⟨1, by norm_num, Filter.Eventually.of_forall ?_⟩ |
| 38 | intro k |
| 39 | dsimp |
| 40 | intro t ht |
| 41 | exact False.elim ht |
| 42 | obtain ⟨tmin, htmin, hmin⟩ := |
| 43 | hIcompact.exists_isMinOn hInonempty continuousOn_id |
| 44 | obtain ⟨tmax, htmax, hmax⟩ := |
| 45 | hIcompact.exists_isMaxOn hInonempty continuousOn_id |
| 46 | let a : ℝ := (T' + tmin) / 2 |
| 47 | let b : ℝ := (T + tmax) / 2 |
| 48 | have ha : T' < a := by |
| 49 | dsimp [a] |
| 50 | linarith [(hI htmin).1, H.time_bounds.1] |
| 51 | have hb : b < T := by |
| 52 | dsimp [b] |
| 53 | linarith [(hI htmax).2, H.time_bounds.2] |
| 54 | have hIcc : I ⊆ Icc a b := by |
| 55 | intro t ht |
| 56 | have hleft : tmin ≤ t := by simpa using hmin ht |
| 57 | have hright : t ≤ tmax := by simpa using hmax ht |
| 58 | dsimp [a, b] |
| 59 | constructor <;> linarith [(hI ht).1, (hI ht).2, (hI htmin).1, (hI htmax).2] |
| 60 | obtain ⟨D, hD, hbound⟩ := |
| 61 | H.eventually_two_time_curvatureDerivativeNorm_le_of_local_derivative_estimates |
| 62 | hShi a b ha hb A hA m |
| 63 | refine ⟨D, hD, ?_⟩ |
| 64 | filter_upwards [hbound] with k hk |
| 65 | dsimp only at hk ⊢ |
| 66 | intro t ht x hx |
| 67 | exact hk 0 ⟨H.time_bounds.1, H.time_bounds.2⟩ t |
| 68 | (hIcc ht) x hx |
| 69 | |
| 70 | /-- The supplied curvature theory gives derivative bounds on compact time sets. -/ |
| 71 | theorem eventually_compact_curvatureDerivativeNorm_le |
| 72 | {n : ℕ} {T' T : ℝ} |
| 73 | (H : PointedRicciFlowCompactnessHypotheses n T' T) |
| 74 | (hM04 : RicciFlowCurvatureTheory.{0}) |
| 75 | {I : Set ℝ} (hIcompact : IsCompact I) (hI : I ⊆ Ioo T' T) |
| 76 | (A : ℝ) (hA : 0 < A) (m : ℕ) : |
| 77 | ∃ D : ℝ, 0 < D ∧ ∀ᶠ k in Filter.atTop, |
| 78 | let C := H.sequence.carrier k |
| 79 | let F := H.sequence.flow k |
| 80 | letI : TopologicalSpace C.carrier := C.topologicalSpace |
| 81 | letI : ChartedSpace (EuclideanSpace ℝ (Fin n)) C.carrier := C.chartedSpace |
| 82 | letI : IsManifold (𝓡 n) ∞ C.carrier := C.isManifold |
| 83 | ∀ t ∈ I, ∀ x ∈ F.zeroBall A, |
| 84 | (F.flow.connection t).curvatureDerivativeNorm m x ≤ D := |
| 85 | H.eventually_compact_curvatureDerivativeNorm_le_of_local_derivative_estimates |
| 86 | hM04.local_derivative_estimates hIcompact hI A hA m |
| 87 | |
| 88 | end PoincareMT.PointedRicciFlowCompactnessHypotheses |