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.ReducedGeometry.ReducedLength.Minimum.CompactTime |
| 2 | |
| 3 | /-! |
| 4 | # Smooth square-time potential on ancient surfaces |
| 5 | |
| 6 | Closed-interval scalar regularity, applied on a slab around each parameter, |
| 7 | removes the apparent endpoint at backward time zero. These are actual |
| 8 | coefficients of the variational problem, without a curvature-theory input. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | |
| 17 | namespace PoincareMT.AncientKappaSolution |
| 18 | |
| 19 | variable {M : Type*} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] [IsManifold (𝓡 2) ∞ M] |
| 21 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 22 | [SecondCountableTopology M] [ConnectedSpace M] |
| 23 | |
| 24 | /-- The actual scalar potential in square-root time is smooth, including at zero. -/ |
| 25 | theorem regularizedPotential_contMDiff (K : AncientKappaSolution 2 M) : |
| 26 | ContMDiff (𝓘(ℝ, ℝ).prod (𝓡 2)) 𝓘(ℝ, ℝ) ∞ |
| 27 | (fun z : ℝ × M => |
| 28 | 2 * z.1 ^ 2 * (K.flow.connection (0 - z.1 ^ 2)).scalarCurvature z.2) := by |
| 29 | intro z |
| 30 | let B : ℝ := |z.1| + 1 |
| 31 | have hB : 0 < B := by dsimp [B]; positivity |
| 32 | have htime : -(B ^ 2 + 1) < 0 := by nlinarith [sq_nonneg B] |
| 33 | let F := Poincare.Geometry.RicciFlow.Harnack.restrictFlow K.flow |
| 34 | (show Icc (-(B ^ 2 + 1)) 0 ⊆ Iic 0 from fun _ ht => ht.2) ordConnected_Icc |
| 35 | ⟨-(B ^ 2 + 1), ⟨le_rfl, htime.le⟩, 0, ⟨htime.le, le_rfl⟩, htime.ne⟩ |
| 36 | have hparam : ContMDiff (𝓘(ℝ, ℝ).prod (𝓡 2)) (𝓘(ℝ, ℝ).prod (𝓡 2)) ∞ |
| 37 | (fun w : ℝ × M => (0 - w.1 ^ 2, w.2)) := |
| 38 | (contMDiff_const.sub (contMDiff_fst.pow 2)).prodMk contMDiff_snd |
| 39 | have hscalar : ContMDiffOn (𝓘(ℝ, ℝ).prod (𝓡 2)) 𝓘(ℝ, ℝ) ∞ |
| 40 | (fun w : ℝ × M => (K.flow.connection (0 - w.1 ^ 2)).scalarCurvature w.2) |
| 41 | (Ioo (-B) B ×ˢ univ) := by |
| 42 | change ContMDiffOn _ _ ∞ |
| 43 | ((fun w : ℝ × M => (F.connection w.1).scalarCurvature w.2) ∘ |
| 44 | fun w : ℝ × M => (0 - w.1 ^ 2, w.2)) _ |
| 45 | apply (F.contMDiffOn_scalarCurvature_surface_Icc htime).comp hparam.contMDiffOn |
| 46 | intro w hw |
| 47 | have hsq : w.1 ^ 2 < B ^ 2 := by |
| 48 | simpa only [sq_abs] using |
| 49 | (sq_lt_sq₀ (abs_nonneg w.1) hB.le).mpr (abs_lt.mpr hw.1) |
| 50 | exact ⟨⟨by nlinarith, by nlinarith [sq_nonneg w.1]⟩, mem_univ _⟩ |
| 51 | have hz : z ∈ Ioo (-B) B ×ˢ (univ : Set M) := |
| 52 | ⟨abs_lt.mp (show |z.1| < B by dsimp [B]; linarith), mem_univ _⟩ |
| 53 | have hs := (hscalar z hz).contMDiffAt ((isOpen_Ioo.prod isOpen_univ).mem_nhds hz) |
| 54 | exact (contMDiffAt_const.mul (contMDiffAt_fst.pow 2)).mul hs |
| 55 | |
| 56 | end PoincareMT.AncientKappaSolution |