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.Alexandrov.Packing.PuncturedAngles |
| 2 | import PoincareLib.Geometry.Alexandrov.Comparison.DistanceAscent |
| 3 | |
| 4 | /-! |
| 5 | # Positive punctured radii for distance ascent |
| 6 | |
| 7 | Finite comparison-angle packing supplies nearly opposite directions near |
| 8 | every center. Hyperbolic chord comparison turns these directions into |
| 9 | arbitrarily short distance-ascent increments. |
| 10 | |
| 11 | Reference: Petrunin (2009), Section 3.4, author manuscript p. 6. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | namespace Poincare.Alexandrov |
| 18 | |
| 19 | theorem exists_pos_punctured_distance_ascent |
| 20 | {X : Type*} [MetricSpace X] |
| 21 | (hX : CurvatureGEnegOne X) |
| 22 | (hgeo : ∀ x y : X, ∃ γ : ℝ → X, γ 0 = x ∧ γ 1 = y ∧ |
| 23 | ∀ s ∈ Set.Icc (0 : ℝ) 1, ∀ t ∈ Set.Icc (0 : ℝ) 1, |
| 24 | dist (γ s) (γ t) = |s - t| * dist x y) |
| 25 | (hpacking : ∀ α : ℝ, 0 < α → ∃ N : ℕ, ComparisonAnglePackingBound X α N) |
| 26 | {c : ℝ} (hc0 : 0 ≤ c) (hc1 : c < 1) (p : X) : |
| 27 | ∃ r : ℝ, 0 < r ∧ ∀ y : X, 0 < dist p y → dist p y < r → |
| 28 | ∀ s : ℝ, 0 < s → ∃ z : X, |
| 29 | dist y z < s ∧ c * dist y z < dist p z - dist p y := by |
| 30 | let α := Real.arccos ((c + 1) / 2) / 2 |
| 31 | have hα : 0 < α := half_pos (Real.arccos_pos.mpr (by linarith)) |
| 32 | have hαpi : α < Real.pi / 2 := by |
| 33 | exact div_lt_div_of_pos_right (Real.arccos_lt_pi.mpr (by linarith)) (by norm_num) |
| 34 | have hcos : Real.cos (2 * α) = (c + 1) / 2 := by |
| 35 | dsimp [α] |
| 36 | rw [mul_div_cancel₀ _ (by norm_num : (2 : ℝ) ≠ 0)] |
| 37 | exact Real.cos_arccos (by linarith) (by linarith) |
| 38 | obtain ⟨N, hN⟩ := hpacking α hα |
| 39 | obtain ⟨r, hr, hnear⟩ := hN.exists_pos_near_opposite hα hαpi p |
| 40 | refine ⟨r, hr, ?_⟩ |
| 41 | intro y hpy hyr |
| 42 | obtain ⟨q, hqy, hangle⟩ := hnear y hpy hyr |
| 43 | obtain ⟨γ, hγ0, hγ1, hγdist⟩ := hgeo y q |
| 44 | apply hX.exists_local_distance_ascent_of_comparisonAngle (dist_pos.mp hpy) hqy |
| 45 | γ hγ0 hγ1 hγdist hc0 |
| 46 | have hcoslt := Real.cos_lt_cos_of_nonneg_of_le_pi |
| 47 | (by linarith : 0 ≤ Real.pi - 2 * α) |
| 48 | (comparisonAngle_le_pi (dist y p) (dist y q) (dist p q)) hangle |
| 49 | rw [Real.cos_pi_sub, hcos] at hcoslt |
| 50 | linarith |
| 51 | |
| 52 | end Poincare.Alexandrov |