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.ODE.CompactPhaseBound |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.ODE.LocalRegularizedCurve |
| 3 | import Mathlib.Topology.Order.IntermediateValue |
| 4 | |
| 5 | /-! |
| 6 | # Compact phase bounds for locally specified regularized curves |
| 7 | |
| 8 | An interval ending strictly beyond the point being bounded supplies a |
| 9 | nondegenerate compact velocity extension, including when that point is zero. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.ReducedLength |
| 19 | |
| 20 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 21 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 22 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] [T3Space M] [SecondCountableTopology M] |
| 23 | |
| 24 | theorem exists_uniform_compact_local_phase_bound {J : Set ℝ} |
| 25 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 26 | (T τmax : ℝ) (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 27 | (hcurvature : CompleteBoundedCurvatureOn F (Set.Icc (T - τmax) T)) |
| 28 | (p : M) (b Emax : ℝ) (hb : 0 < b) (hbmax : b < τmax) (hEmax : 0 ≤ Emax) : |
| 29 | ∃ K : Set (ℝ × TangentBundle (𝓡 n) M), IsCompact K ∧ |
| 30 | ∀ (γ : ℝ → M) (U : Set ℝ), IsOpen U → IsPreconnected U → 0 ∈ U → |
| 31 | IsLocalRegularizedCurveOn F T γ U → γ 0 = p → |
| 32 | regularizedCurveEnergy F T γ 0 ≤ Emax → |
| 33 | ∀ s ∈ U, 0 ≤ s → s < Real.sqrt b → (s, curvePhase (n := n) γ s) ∈ K := by |
| 34 | obtain ⟨K, hK, hbound⟩ := exists_uniform_compact_phase_bound F hM04 T τmax hτmax |
| 35 | hwindow hcurvature p b Emax hb hbmax hEmax |
| 36 | refine ⟨K, hK, ?_⟩ |
| 37 | intro γ U hU hconn h0 hγ hstart henergy s hs hs0 hsb |
| 38 | obtain ⟨a, c, hsac, hac⟩ := mem_nhds_iff_exists_Ioo_subset.mp |
| 39 | ((hU.inter isOpen_Iio).mem_nhds ⟨hs, hsb⟩) |
| 40 | obtain ⟨h, hsh, hhc⟩ := exists_between hsac.2 |
| 41 | have hh : h ∈ U ∩ Set.Iio (Real.sqrt b) := hac ⟨hsac.1.trans hsh, hhc⟩ |
| 42 | have hh0 : 0 < h := hs0.trans_lt hsh |
| 43 | have hIU : Set.Icc 0 h ⊆ U := hconn.ordConnected.out h0 hh.1 |
| 44 | have htime : Set.Icc 0 h ⊆ Set.Ioo (-Real.sqrt τmax) (Real.sqrt τmax) := by |
| 45 | intro t ht |
| 46 | exact ⟨(neg_lt_zero.mpr (Real.sqrt_pos.mpr hτmax)).trans_le ht.1, |
| 47 | ht.2.trans_lt (hh.2.trans (Real.sqrt_lt_sqrt hb.le hbmax))⟩ |
| 48 | obtain ⟨E, heq⟩ := exists_regularizedExtensionOn_compact F hM04 T τmax hτmax hwindow |
| 49 | γ U (Set.Icc 0 h) hU hIU isCompact_Icc (uniqueDiffOn_Icc hh0) htime hγ.smooth |
| 50 | (fun t ht ↦ hγ.equation t (hIU ht)) |
| 51 | exact hbound γ U h hh0.le hh.2 hU hIU hγ.smooth hstart E heq henergy s ⟨hs0, hsh.le⟩ |
| 52 | |
| 53 | end PoincareMT.ReducedLength |