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.CanonicalNeighborhood.Neck.Geodesic.Intrinsic |
| 2 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Neck.Separation.Segment |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Lifetime.CanonicalGeometry.CapPersistenceNormalization |
| 4 | |
| 5 | /-! |
| 6 | # Explicit distances at the actual doubled neck accuracy |
| 7 | |
| 8 | The intrinsic spherical competitor costs at most twenty scales. A |
| 9 | unit-speed segment from the literal center to a half-neck slice takes |
| 10 | at least twenty-five scales at epsilon <= 1/100. |
| 11 | MT Proposition 17.1; limit-finite-neck-exits.md, T1-T2. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Topology ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M47 |
| 23 | |
| 24 | variable {M : Type u} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 26 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 27 | {g : RiemannianMetric 3 M} (N : EpsilonNeck g) |
| 28 | |
| 29 | /-- The original intrinsic spherical competitor bounds actual distance |
| 30 | between any two carrier points at the same literal neck height. -/ |
| 31 | theorem limitFinite_same_height_distance |
| 32 | {x y : M} (hx : x ∈ N.carrier) (hy : y ∈ N.carrier) |
| 33 | (hheight : (N.coordinate_inverse x).2 = (N.coordinate_inverse y).2) : |
| 34 | (g.edist x y).toReal ≤ 20 * N.scale := by |
| 35 | have hscale := N.scale_pos |
| 36 | have hroot : Real.sqrt (1 + N.epsilon) ≤ 2 := by |
| 37 | apply Real.sqrt_le_iff.mpr |
| 38 | constructor |
| 39 | · norm_num |
| 40 | · linarith [N.epsilon_lt_half] |
| 41 | have hroot2 : Real.sqrt 2 ≤ 2 := by norm_num |
| 42 | have hangle : Real.sqrt 2 * (Real.pi + 1) ≤ 10 := by |
| 43 | calc |
| 44 | _ ≤ 2 * 5 := mul_le_mul hroot2 (by linarith [Real.pi_le_four]) |
| 45 | (by positivity) (by norm_num) |
| 46 | _ = 10 := by norm_num |
| 47 | have hfactor : N.scale * Real.sqrt (1 + N.epsilon) * |
| 48 | (Real.sqrt 2 * (Real.pi + 1)) ≤ 20 * N.scale := by |
| 49 | calc |
| 50 | _ ≤ (N.scale * 2) * 10 := mul_le_mul |
| 51 | (mul_le_mul_of_nonneg_left hroot N.scale_pos.le) hangle |
| 52 | (by positivity) (by positivity) |
| 53 | _ = _ := by ring |
| 54 | have hlength := (edist_le_intrinsicEDist (g := g) N.carrier x y).trans |
| 55 | (N.intrinsicEDist_le_axial_add hx hy) |
| 56 | simp only [hheight, sub_self, abs_zero, zero_add] at hlength |
| 57 | have hbound := hlength.trans (ENNReal.ofReal_le_ofReal hfactor) |
| 58 | simpa only [ENNReal.toReal_ofReal (by positivity : 0 ≤ 20 * N.scale)] using |
| 59 | ENNReal.toReal_mono ENNReal.ofReal_ne_top hbound |
| 60 | |
| 61 | /-- The actual center has axial coordinate zero, so a unit-speed |
| 62 | half-neck hit occurs no earlier than twenty-five scales. -/ |
| 63 | theorem limitFinite_half_neck_time_lower |
| 64 | (hepsilon : N.epsilon ≤ 1 / 100) {gamma : ℝ → M} {s : ℝ} (hs : 0 ≤ s) |
| 65 | (hgamma : g.IsGeodesicOn gamma (Icc 0 s)) |
| 66 | (hcarrier : MapsTo gamma (Icc 0 s) N.carrier) |
| 67 | (hspeed : ∀ t ∈ Icc 0 s, |
| 68 | g.tangentNorm (gamma t) (mfderiv 𝓘(ℝ, ℝ) (𝓡 3) gamma t 1) = 1) |
| 69 | (hstart : gamma 0 = N.center) |
| 70 | (hboundary : |(N.coordinate_inverse (gamma s)).2| = N.epsilon⁻¹ / 2) : |
| 71 | 25 * N.scale ≤ s := by |
| 72 | have heps := N.epsilon_pos |
| 73 | have haxis0 := ((N.mem_central_sphere_iff N.center).mp N.center_on_central_sphere).2 |
| 74 | have hdisp := N.axial_displacement_le_of_unit_speed hs hgamma hcarrier hspeed |
| 75 | rw [hstart, haxis0, sub_zero, hboundary] at hdisp |
| 76 | have hroot : 1 / 2 ≤ Real.sqrt (1 - N.epsilon) := by |
| 77 | have hsqrt := Real.sq_sqrt (show 0 ≤ 1 - N.epsilon by linarith) |
| 78 | nlinarith [Real.sqrt_nonneg (1 - N.epsilon)] |
| 79 | have hfactor : 0 < N.scale * Real.sqrt (1 - N.epsilon) := |
| 80 | mul_pos N.scale_pos (Real.sqrt_pos.mpr (by linarith)) |
| 81 | have hscaled := (le_inv_mul_iff₀ hfactor).mp hdisp |
| 82 | have hlow := (mul_le_mul_of_nonneg_right |
| 83 | (mul_le_mul_of_nonneg_left hroot N.scale_pos.le) |
| 84 | (by positivity : 0 ≤ N.epsilon⁻¹ / 2)).trans hscaled |
| 85 | have hinv : 100 ≤ N.epsilon⁻¹ := by |
| 86 | rw [inv_eq_one_div] |
| 87 | apply (le_div_iff₀ N.epsilon_pos).mpr |
| 88 | linarith |
| 89 | have hproduct := mul_le_mul_of_nonneg_left hinv N.scale_pos.le |
| 90 | nlinarith |
| 91 | |
| 92 | end PoincareMT.M47 |