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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.NeckGeometry.NeckFrontierDistance |
| 3 | |
| 4 | /-! |
| 5 | # Short retained-path segments stay in an axial slab |
| 6 | |
| 7 | The cap-boundary crossing uses the sharp axial displacement estimate on a |
| 8 | segment that is already known to remain in one selected neck. This is the |
| 9 | path form of the slab escape estimate; it does not turn an ambient distance |
| 10 | bound into a carrier path or assume a global completeness witness. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M28 |
| 21 | |
| 22 | variable {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 24 | [IsManifold (𝓡 3) ∞ M] |
| 25 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 26 | {g : RiemannianMetric 3 M} |
| 27 | |
| 28 | omit [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] in |
| 29 | /-- A retained path segment shorter than the sharp axial cost of a radius `r` |
| 30 | cannot leave the axial slab of radius `r` about its initial height. -/ |
| 31 | theorem path_endpoint_mem_slab_of_short_length (W : EpsilonNeck g) |
| 32 | {γ : ℝ → M} {a b : ℝ} (hab : a ≤ b) |
| 33 | (hγ : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc a b)) |
| 34 | (hγW : MapsTo γ (Icc a b) W.carrier) {r : ℝ} (hr : 0 < r) |
| 35 | (_hrA : r < W.epsilon⁻¹ - |
| 36 | |(W.coordinate_inverse (γ a)).2|) |
| 37 | (hshort : g.pathELength γ a b < |
| 38 | ENNReal.ofReal ((W.scale * Real.sqrt (1 - W.epsilon)) * r)) : |
| 39 | γ b ∈ W.region |
| 40 | ((W.coordinate_inverse (γ a)).2 - r) |
| 41 | ((W.coordinate_inverse (γ a)).2 + r) := by |
| 42 | have hfactor : 0 < W.scale * Real.sqrt (1 - W.epsilon) := by |
| 43 | exact mul_pos W.scale_pos |
| 44 | (Real.sqrt_pos.mpr (by linarith [W.epsilon_lt_half])) |
| 45 | have hdisp := W.path_axial_displacement_le_sharp hab hγ hγW |
| 46 | have hcost : ENNReal.ofReal |
| 47 | ((W.scale * Real.sqrt (1 - W.epsilon)) * |
| 48 | |(W.coordinate_inverse (γ b)).2 - |
| 49 | (W.coordinate_inverse (γ a)).2|) < |
| 50 | ENNReal.ofReal ((W.scale * Real.sqrt (1 - W.epsilon)) * r) := |
| 51 | hdisp.trans_lt hshort |
| 52 | have hreal : W.scale * Real.sqrt (1 - W.epsilon) * |
| 53 | |(W.coordinate_inverse (γ b)).2 - |
| 54 | (W.coordinate_inverse (γ a)).2| < |
| 55 | W.scale * Real.sqrt (1 - W.epsilon) * r := by |
| 56 | exact (ENNReal.ofReal_lt_ofReal_iff |
| 57 | (mul_pos hfactor hr)).mp hcost |
| 58 | have habs : |(W.coordinate_inverse (γ b)).2 - |
| 59 | (W.coordinate_inverse (γ a)).2| < r := by |
| 60 | nlinarith [hreal, hfactor] |
| 61 | have habs' := (abs_lt.mp habs) |
| 62 | refine ⟨hγW ⟨hab, le_rfl⟩, ?_, ?_⟩ |
| 63 | · linarith [habs'.1] |
| 64 | · linarith [habs'.2] |
| 65 | |
| 66 | end PoincareMT.M28 |