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.AncientKappa.Basic |
| 2 | import PoincareLib.Geometry.RicciFlow.Soliton.Basic |
| 3 | import PoincareLib.Geometry.RicciFlow.Harnack.Regularity |
| 4 | |
| 5 | /-! |
| 6 | # Static noncollapse and closed ancient restrictions |
| 7 | |
| 8 | The parabolic curvature hypothesis includes the terminal slice. Thus static |
| 9 | noncollapse of every slice supplies the ancient parabolic condition for the |
| 10 | same total metric and connection families restricted through time zero. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.RicciFlow |
| 22 | |
| 23 | /-- Static noncollapse on an open ancient flow supplies the exact parabolic |
| 24 | noncollapse condition on its closed restriction through time zero. -/ |
| 25 | theorem ancientKappaNoncollapsed_restrict_of_metricKappaNoncollapsed |
| 26 | {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 28 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 29 | [SecondCountableTopology M] [ConnectedSpace M] |
| 30 | {δ κ : ℝ} (F : RicciFlow n M (Iio δ)) (hδ : 0 < δ) |
| 31 | (hκ : ∀ t ∈ Iio δ, MetricKappaNoncollapsed (F.metric t) (F.connection t) κ) : |
| 32 | AncientKappaNoncollapsed |
| 33 | (Poincare.Geometry.RicciFlow.Harnack.restrictFlow F |
| 34 | (show Iic (0 : ℝ) ⊆ Iio δ from fun _ ht => ht.trans_lt hδ) |
| 35 | ordConnected_Iic (show (Iic (0 : ℝ)).Nontrivial from |
| 36 | ⟨-1, by norm_num, 0, by simp, by norm_num⟩)) κ := by |
| 37 | intro r₀ _ t ht x r hr _ hcurv |
| 38 | apply (hκ t (ht.trans_lt hδ)).2 x r hr |
| 39 | intro y hy |
| 40 | exact hcurv t ⟨by nlinarith [sq_pos_of_pos hr], le_rfl⟩ y hy |
| 41 | |
| 42 | end PoincareMT.RicciFlow |