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.NeckAxialLength |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Tube.NeckGeometry.NeckExcursionSubarcs |
| 4 | |
| 5 | /-! |
| 6 | # The sharp axial cost before a source-neck exit |
| 7 | |
| 8 | The actual order-zero metric comparison gives the factor sqrt(1-epsilon). |
| 9 | Integrating it on the compact first-exit prefix bounds ambient distance |
| 10 | without completeness or any assumption about later portions of a curve. |
| 11 | These are the distance estimates for balanced neighbors in Appendix A.17, |
| 12 | as used by Claim 10.4; see M28 derivation 35. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.EpsilonNeck |
| 23 | |
| 24 | open Proofs.M28.NeckLengthComparison |
| 25 | |
| 26 | variable {M : Type u} [TopologicalSpace M] |
| 27 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 28 | [IsManifold (𝓡 3) ∞ M] {g : RiemannianMetric 3 M} |
| 29 | |
| 30 | /-- The sharp axial speed factor comes from the literal frozen metric |
| 31 | comparison, including the lower-order metric error. -/ |
| 32 | theorem coordinate_axial_speed_lower_sharp (N : EpsilonNeck g) |
| 33 | (z : RoundCylinderSpace) (hz : z.2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) |
| 34 | (v : RoundCylinderCoordinates) : |
| 35 | (N.scale * Real.sqrt (1 - N.epsilon)) * |v.2| ≤ |
| 36 | g.tangentNorm (N.coordinate_map z) |
| 37 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) N.coordinate_map z v) := by |
| 38 | let P := roundCylinderPullback g N.coordinate_map z v v |
| 39 | let H := RoundCylinderMetric z v v |
| 40 | have hfactor : 0 ≤ 1 - N.epsilon := by linarith [N.epsilon_lt_half] |
| 41 | have hmodel : v.2 ^ 2 ≤ H := by |
| 42 | dsimp only [H] |
| 43 | rw [roundCylinderMetric_self_eq] |
| 44 | nlinarith only [sq_nonneg ‖v.1‖] |
| 45 | have hH : 0 ≤ H := (sq_nonneg v.2).trans hmodel |
| 46 | have hbound := mul_le_mul_of_nonneg_left |
| 47 | (N.normalized_metric_quadratic_bounds z hz v).1 (sq_nonneg N.scale) |
| 48 | have hcancel : N.scale ^ 2 * (N.scale⁻¹ ^ 2 * P) = P := by |
| 49 | field_simp [ne_of_gt N.scale_pos] |
| 50 | change N.scale ^ 2 * ((1 - N.epsilon) * H) ≤ |
| 51 | N.scale ^ 2 * (N.scale⁻¹ ^ 2 * P) at hbound |
| 52 | rw [hcancel] at hbound |
| 53 | have hP : 0 ≤ P := |
| 54 | (mul_nonneg (sq_nonneg N.scale) (mul_nonneg hfactor hH)).trans hbound |
| 55 | have haxial := mul_le_mul_of_nonneg_left hmodel |
| 56 | (mul_nonneg (sq_nonneg N.scale) hfactor) |
| 57 | change (N.scale * Real.sqrt (1 - N.epsilon)) * |v.2| ≤ Real.sqrt P |
| 58 | apply (sq_le_sq₀ |
| 59 | (mul_nonneg (mul_nonneg N.scale_pos.le (Real.sqrt_nonneg _)) (abs_nonneg _)) |
| 60 | (Real.sqrt_nonneg _)).mp |
| 61 | rw [mul_pow, mul_pow, Real.sq_sqrt hfactor, sq_abs, Real.sq_sqrt hP] |
| 62 | nlinarith only [haxial, hbound] |
| 63 | |
| 64 | /-- Actual subarc length pays the sharp axial cost in the source neck. -/ |
| 65 | theorem path_axial_displacement_le_sharp (N : EpsilonNeck g) |
| 66 | {γ : ℝ → M} {a b : ℝ} (hab : a ≤ b) |
| 67 | (hγ : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 γ (Icc a b)) |
| 68 | (hγN : MapsTo γ (Icc a b) N.carrier) : |
| 69 | ENNReal.ofReal ((N.scale * Real.sqrt (1 - N.epsilon)) * |
| 70 | |(N.coordinate_inverse (γ b)).2 - (N.coordinate_inverse (γ a)).2|) ≤ |
| 71 | g.pathELength γ a b := |
| 72 | M28.path_axial_displacement_le_of_speed N |
| 73 | (mul_nonneg N.scale_pos.le (Real.sqrt_nonneg _)) |
| 74 | N.coordinate_axial_speed_lower_sharp hab hγ hγN |
| 75 | |
| 76 | /-- Every ambient curve from the central sphere to the exterior of an |
| 77 | inner collar has the sharp collar cost, even if it later leaves the neck. -/ |
| 78 | theorem edist_central_lower_of_not_mem_region [T2Space M] |
| 79 | (N : EpsilonNeck g) {r : ℝ} (hr : 0 < r) (hrA : r < N.epsilon⁻¹) |
| 80 | {p x : M} (hp : p ∈ N.central_sphere) (hx : x ∉ N.region (-r) r) : |
| 81 | ENNReal.ofReal ((N.scale * Real.sqrt (1 - N.epsilon)) * r) ≤ g.edist p x := by |
| 82 | let : Bundle.RiemannianBundle (TangentSpace (𝓡 3) : M → Type _) := |
| 83 | ⟨g.toRiemannianMetric⟩ |
| 84 | by_contra h |
| 85 | obtain ⟨γ, h0, h1, hγ, hlength⟩ := |
| 86 | Manifold.exists_lt_of_riemannianEDist_lt (lt_of_not_ge h) |
| 87 | obtain ⟨t, ht0, ht1, hprefix, hheight⟩ := |
| 88 | N.exists_first_neck_collar_subarc hr hrA zero_le_one hγ.continuousOn |
| 89 | (by simpa only [h0] using hp) (by simpa only [h1] using hx) |
| 90 | have hcost := N.path_axial_displacement_le_sharp ht0.le |
| 91 | (hγ.mono (Icc_subset_Icc le_rfl ht1)) hprefix |
| 92 | rw [hheight] at hcost |
| 93 | exact (not_lt_of_ge (hcost.trans (Manifold.pathELength_mono le_rfl ht1))) hlength |
| 94 | |
| 95 | end PoincareMT.EpsilonNeck |