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.Blowup.Construction.CompactCylinder.FiniteCylinder |
| 2 | import PoincareLib.Geometry.RicciFlow.Blowup.Construction.CompactCylinder.CompactBuffer |
| 3 | |
| 4 | /-! |
| 5 | # Curvature derivatives on any buffered terminal subwindow |
| 6 | |
| 7 | The positive time margin T - tau allows any closed target window strictly |
| 8 | inside the supplied source window. The spatial compact buffer and Shi |
| 9 | estimate retain the original flow and connection at both target endpoints. |
| 10 | This is Morgan--Tian Theorem 3.28, p. 51, used in Corollaries 11.3-11.4, |
| 11 | pp. 269-270, and the finite-horizon assembly of Theorem 11.8, pp. 272-279. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M30 |
| 22 | |
| 23 | /-- A positive earlier-time margin and compact terminal spatial buffer |
| 24 | give uniform spatial curvature derivatives on the actual closed later |
| 25 | window (Theorems 3.28 and 11.8, pp. 51 and 272-279). The bound is chosen |
| 26 | before the manifold, metric, source flow and tested point. -/ |
| 27 | theorem exists_uniform_curvatureDerivativeNorm_bound_on_terminal_subwindow |
| 28 | (hShi : LocalCurvatureDerivativeEstimates.{u}) (n m : ℕ) |
| 29 | (B T tau A R : ℝ) (htau : 0 < tau) (htauT : tau < T) |
| 30 | (hA : 0 < A) (hAR : A < R) : |
| 31 | ∃ D : ℝ, 0 < D ∧ |
| 32 | ∀ (M : Type u) [TopologicalSpace M] |
| 33 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 34 | [T2Space M] [SecondCountableTopology M], |
| 35 | ∀ (g : RiemannianMetric n M) (p : M) (U : TopologicalSpace.Opens M), |
| 36 | (U : Set M) = g.ball p R → |
| 37 | ∀ (G : RicciFlow n U (Icc (-T) 0)), |
| 38 | (∀ (x : U) (v w : TangentSpace (𝓡 n) x), |
| 39 | (G.metric 0).inner x v w = g.inner x.val |
| 40 | (mfderiv (𝓡 n) (𝓡 n) (Subtype.val : U → M) x v) |
| 41 | (mfderiv (𝓡 n) (𝓡 n) (Subtype.val : U → M) x w)) → |
| 42 | (∀ s ∈ Icc (-T) 0, ∀ y : U, (G.connection s).curvatureTensorNorm y ≤ B) → |
| 43 | IsCompact (closure (g.ball p ((A + R) / 2))) → |
| 44 | ∀ s ∈ Icc (-tau) 0, ∀ x : U, x.val ∈ g.ball p A → |
| 45 | (G.connection s).curvatureDerivativeNorm m x ≤ D := by |
| 46 | have hT : 0 < T := htau.trans htauT |
| 47 | let r : ℝ := (R - A) / (2 * Real.exp ((n : ℝ) ^ 3 * max B 1 * T)) |
| 48 | have hr : 0 < r := div_pos (sub_pos.mpr hAR) (by positivity) |
| 49 | obtain ⟨D, hD, hbound⟩ := |
| 50 | exists_uniform_curvatureDerivativeNorm_bound_on_buffered_cylinders |
| 51 | hShi n m B T r (T - tau) hT hr (sub_pos.mpr htauT) |
| 52 | refine ⟨D, hD, ?_⟩ |
| 53 | intro M _ _ _ _ _ g p U hU G hmetric hcurv hcompact |
| 54 | let V : Set U := (Subtype.val : U → M) ⁻¹' g.ball p A |
| 55 | have hprecompact (x : U) (hx : x ∈ V) : |
| 56 | IsCompact (closure ((G.metric (-T)).ball x r)) := |
| 57 | isCompact_closure_initial_ball_of_terminal_buffer g p U hT hA hAR hU |
| 58 | G hmetric hcurv hcompact x hx |
| 59 | intro s hs x hx |
| 60 | exact hbound U G V hprecompact hcurv s ⟨by linarith [hs.1], hs.2⟩ x hx |
| 61 | |
| 62 | end PoincareMT.M30 |