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 | # Spatial derivatives on a retained closed source window |
| 6 | |
| 7 | An actual terminal inclusion-pullback metric and a larger compact spatial |
| 8 | buffer provide the initial balls for Shi's estimate. The resulting bound |
| 9 | uses the supplied flow's own connection throughout the closed later half |
| 10 | of its interval. Morgan--Tian Theorem 3.28, p. 51, and Corollaries 11.3-11.4, |
| 11 | pp. 269-270; see the retained-source-family derivation. |
| 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 compact terminal spatial buffer gives uniform curvature derivatives |
| 24 | for the same supplied flow, including the terminal endpoint (Theorem 3.28 |
| 25 | and Corollaries 11.3-11.4, pp. 51 and 269-270). The constant precedes the |
| 26 | ambient carrier, metric, source flow and tested center. -/ |
| 27 | theorem exists_uniform_curvatureDerivativeNorm_bound_on_terminal_buffer |
| 28 | (hShi : LocalCurvatureDerivativeEstimates.{u}) (n m : ℕ) (B T A R : ℝ) |
| 29 | (hT : 0 < T) (hA : 0 < A) (hAR : A < R) : |
| 30 | ∃ D : ℝ, 0 < D ∧ |
| 31 | ∀ (M : Type u) [TopologicalSpace M] |
| 32 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 33 | [T2Space M] [SecondCountableTopology M], |
| 34 | ∀ (g : RiemannianMetric n M) (p : M) (U : TopologicalSpace.Opens M), |
| 35 | (U : Set M) = g.ball p R → |
| 36 | ∀ (G : RicciFlow n U (Icc (-T) 0)), |
| 37 | (∀ (x : U) (v w : TangentSpace (𝓡 n) x), |
| 38 | (G.metric 0).inner x v w = g.inner x.val |
| 39 | (mfderiv (𝓡 n) (𝓡 n) (Subtype.val : U → M) x v) |
| 40 | (mfderiv (𝓡 n) (𝓡 n) (Subtype.val : U → M) x w)) → |
| 41 | (∀ s ∈ Icc (-T) 0, ∀ y : U, (G.connection s).curvatureTensorNorm y ≤ B) → |
| 42 | IsCompact (closure (g.ball p ((A + R) / 2))) → |
| 43 | ∀ s ∈ Icc (-(T / 2)) 0, ∀ x : U, x.val ∈ g.ball p A → |
| 44 | (G.connection s).curvatureDerivativeNorm m x ≤ D := by |
| 45 | let r : ℝ := (R - A) / (2 * Real.exp ((n : ℝ) ^ 3 * max B 1 * T)) |
| 46 | have hr : 0 < r := div_pos (sub_pos.mpr hAR) (by positivity) |
| 47 | obtain ⟨D, hD, hbound⟩ := |
| 48 | exists_uniform_curvatureDerivativeNorm_bound_on_buffered_cylinders |
| 49 | hShi n m B T r (T / 2) hT hr (half_pos hT) |
| 50 | refine ⟨D, hD, ?_⟩ |
| 51 | intro M _ _ _ _ _ g p U hU G hmetric hcurv hcompact |
| 52 | let V : Set U := (Subtype.val : U → M) ⁻¹' g.ball p A |
| 53 | have hprecompact (x : U) (hx : x ∈ V) : |
| 54 | IsCompact (closure ((G.metric (-T)).ball x r)) := |
| 55 | isCompact_closure_initial_ball_of_terminal_buffer g p U hT hA hAR hU |
| 56 | G hmetric hcurv hcompact x hx |
| 57 | intro s hs x hx |
| 58 | exact hbound U G V hprecompact hcurv s |
| 59 | ⟨by linarith [hs.1], hs.2⟩ x hx |
| 60 | |
| 61 | end PoincareMT.M30 |