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.Surgery.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.NeckInnerExit |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.NeckBufferedBall |
| 4 | |
| 5 | /-! |
| 6 | # Actual retained balls around the whole inner cylinder slab |
| 7 | |
| 8 | Morgan-Tian Theorem 12.32, pp. 326-327. The axial room between a |
| 9 | point and the retained exit level controls an actual ambient ball, |
| 10 | uniformly in its sphere coordinate. This supplies the initial-neck |
| 11 | margin without a bound on distances along a spherical orbit. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle ENNReal |
| 18 | |
| 19 | namespace PoincareMT.StandardCylinderPatch |
| 20 | |
| 21 | /-- Every actual point of the inner slab has an ambient retained |
| 22 | ball of half the remaining axial room. -/ |
| 23 | theorem inner_slab_ball_subset_carrier {epsilon u ell L : ℝ} |
| 24 | {x y : StandardCapSpace} (N : StandardCylinderPatch epsilon⁻¹ x) |
| 25 | (g : RiemannianMetric 3 StandardCapSpace) (he : 0 < epsilon) |
| 26 | (hesmall : epsilon ≤ 1 / 24) (hu : u ∈ Icc (-1) 0) |
| 27 | (hL : L < ell) (hlong : ell < epsilon⁻¹) |
| 28 | (hclose : RoundCylinderClose epsilon u (roundCylinderPullback g N.coordinate)) |
| 29 | (hy : y ∈ N.carrier) (hyax : |(N.inverse y).2| ≤ L) : |
| 30 | g.ball y ((ell - L) / 2) ⊆ N.carrier := by |
| 31 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : StandardCapSpace → Type _) := |
| 32 | ⟨g.toRiemannianMetric⟩ |
| 33 | intro z hz |
| 34 | by_contra hout |
| 35 | obtain ⟨gamma, hzero, hone, hsmooth, hlength⟩ := |
| 36 | Manifold.exists_lt_of_riemannianEDist_lt hz |
| 37 | have hstart : gamma 0 ∈ N.coordinate '' (univ ×ˢ Ioo (-ell) ell) := by |
| 38 | rw [hzero] |
| 39 | exact ⟨N.inverse y, ⟨mem_univ _, abs_lt.mp (hyax.trans_lt hL)⟩, |
| 40 | N.coordinate_right_inverse hy⟩ |
| 41 | obtain ⟨t, ht, hslab, hexit⟩ := N.exists_first_axial_exit_of_mem hlong |
| 42 | gamma hsmooth.continuousOn hstart (hone ▸ hout) |
| 43 | let clock : ℝ → ℝ := fun s => t * s |
| 44 | let eta := gamma ∘ clock |
| 45 | have hclock : ContDiff ℝ 1 clock := contDiff_const.mul contDiff_id |
| 46 | have hclockmap : MapsTo clock (Icc (0 : ℝ) 1) (Icc 0 t) := by |
| 47 | intro s hs |
| 48 | exact ⟨mul_nonneg ht.1.le hs.1, |
| 49 | (mul_le_mul_of_nonneg_left hs.2 ht.1.le).trans_eq (mul_one t)⟩ |
| 50 | have hsmall : Icc (0 : ℝ) t ⊆ Icc 0 1 := Icc_subset_Icc le_rfl ht.2 |
| 51 | have heta : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 eta (Icc 0 1) := |
| 52 | (hsmooth.mono hsmall).comp hclock.contMDiff.contMDiffOn hclockmap |
| 53 | have himage : MapsTo eta (Icc (0 : ℝ) 1) N.carrier := |
| 54 | fun s hs => N.closed_axial_slab_subset_carrier hlong (hslab _ (hclockmap hs)) |
| 55 | have hmon : MonotoneOn clock (Icc (0 : ℝ) 1) := by |
| 56 | intro a _ b _ hab |
| 57 | exact mul_le_mul_of_nonneg_left hab ht.1.le |
| 58 | have hd : MDifferentiableOn 𝓘(ℝ, ℝ) (𝓡 3) gamma (Icc (clock 0) (clock 1)) := by |
| 59 | simpa only [clock, mul_zero, mul_one] using |
| 60 | (hsmooth.mono hsmall).mdifferentiableOn one_ne_zero |
| 61 | have hparam : g.pathELength eta 0 1 = g.pathELength gamma 0 t := by |
| 62 | have h := Manifold.pathELength_comp_of_monotoneOn (I := 𝓡 3) zero_le_one |
| 63 | hmon (hclock.differentiable one_ne_zero).differentiableOn hd |
| 64 | convert! h using 1 |
| 65 | simp only [clock, mul_zero, mul_one] |
| 66 | rfl |
| 67 | have hlenle : g.pathELength eta 0 1 ≤ g.pathELength gamma 0 1 := |
| 68 | hparam.le.trans (Manifold.pathELength_mono le_rfl ht.2) |
| 69 | have hax := N.axial_edist_le_pathELength g he hesmall hu hclose eta heta himage |
| 70 | have hax0 : eta 0 = y := by simpa only [eta, Function.comp_apply, clock, mul_zero] using hzero |
| 71 | have hax1 : eta 1 = gamma t := by simp only [eta, Function.comp_apply, clock, mul_one] |
| 72 | rw [hax0, hax1, edist_dist, Real.dist_eq] at hax |
| 73 | have hdisplacement : ell - L ≤ |(N.inverse y).2 - (N.inverse (gamma t)).2| := by |
| 74 | have h := abs_sub_abs_le_abs_sub (N.inverse (gamma t)).2 (N.inverse y).2 |
| 75 | rw [hexit, abs_sub_comm (N.inverse (gamma t)).2 (N.inverse y).2] at h |
| 76 | linarith only [h, hyax] |
| 77 | have hbound := (ENNReal.ofReal_le_ofReal hdisplacement).trans hax |
| 78 | have hstrict : 2 * g.pathELength eta 0 1 < ENNReal.ofReal (ell - L) := by |
| 79 | calc |
| 80 | 2 * g.pathELength eta 0 1 ≤ 2 * g.pathELength gamma 0 1 := mul_le_mul_right hlenle 2 |
| 81 | _ < 2 * ENNReal.ofReal ((ell - L) / 2) := |
| 82 | ENNReal.mul_lt_mul_right (by norm_num) (by norm_num) hlength |
| 83 | _ = ENNReal.ofReal (2 * ((ell - L) / 2)) := by |
| 84 | rw [ENNReal.ofReal_mul (by norm_num : (0 : ℝ) ≤ 2), ENNReal.ofReal_ofNat] |
| 85 | _ = ENNReal.ofReal (ell - L) := by congr 1; ring |
| 86 | exact (not_lt_of_ge hbound) hstrict |
| 87 | |
| 88 | end PoincareMT.StandardCylinderPatch |