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.LowerCurvature |
| 2 | |
| 3 | /-! |
| 4 | # Alexandrov comparison in pointed Gromov--Hausdorff limits |
| 5 | |
| 6 | Four-point comparison passes first to bounded pointed limits and then to |
| 7 | unbounded pointed limits by enclosing each quadruple in one ball. |
| 8 | |
| 9 | References: Burago--Gromov--Perelman (1992), Definition 2.3, p. 5; |
| 10 | Petrunin (2009), Section 1.5, p. 3, and Section 3.2, p. 5. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter Topology |
| 17 | open Poincare.GromovHausdorff |
| 18 | |
| 19 | namespace Poincare.Alexandrov |
| 20 | |
| 21 | /-- Bounded pointed Gromov--Hausdorff limits preserve four-point comparison. -/ |
| 22 | theorem curvatureGEnegOne_of_pointedGHConverges |
| 23 | {X : ℕ → FiniteDiameterBasedMetricSpace} {Y : FiniteDiameterBasedMetricSpace} |
| 24 | (hX : ∀ j, CurvatureGEnegOne (X j).carrier) (h : PointedGHConverges X Y) : |
| 25 | CurvatureGEnegOne Y.carrier := by |
| 26 | obtain ⟨f, hf⟩ := exists_approximating_maps_of_pointedGHConverges h |
| 27 | intro q hq |
| 28 | exact fourPoint_comparison_of_tendsto_dist hX hq (fun a b => hf (q a) (q b)) |
| 29 | |
| 30 | /-- The curvature minus one four-point condition is closed under pointed |
| 31 | Gromov--Hausdorff convergence on bounded regions. -/ |
| 32 | theorem curvatureGEnegOne_of_pointedGHConvergesUnbounded |
| 33 | {X : ℕ → BasedMetricSpaceBundle} {Y : BasedMetricSpaceBundle} |
| 34 | (hX : ∀ j, CurvatureGEnegOne (X j).carrier) |
| 35 | (h : PointedGHConvergesUnbounded X Y) : |
| 36 | CurvatureGEnegOne Y.carrier := by |
| 37 | intro q hq |
| 38 | let r : ℝ := 1 + ∑ i : Fin 4, dist (q i) Y.base |
| 39 | have hsum : 0 ≤ ∑ i : Fin 4, dist (q i) Y.base := |
| 40 | Finset.sum_nonneg (fun _ _ => dist_nonneg) |
| 41 | have hr : 0 < r := by dsimp [r]; linarith |
| 42 | have hqr (i : Fin 4) : q i ∈ Metric.ball Y.base r := by |
| 43 | rw [Metric.mem_ball] |
| 44 | have hi := Finset.single_le_sum (fun (j : Fin 4) _ => |
| 45 | show 0 ≤ dist (q j) Y.base from dist_nonneg) (Finset.mem_univ i) |
| 46 | dsimp [r] |
| 47 | linarith |
| 48 | obtain ⟨δ, _, hpos, hconv⟩ := h r hr |
| 49 | have hballs (j : ℕ) : CurvatureGEnegOne (ballModel (X j) (r + δ j) (hpos j)).carrier := |
| 50 | (hX j).of_isometry (f := Subtype.val) (Isometry.of_dist_eq (fun _ _ => rfl)) |
| 51 | have hlimit := curvatureGEnegOne_of_pointedGHConverges hballs hconv |
| 52 | let q' : Fin 4 → (ballModel Y r hr).carrier := fun i => ⟨q i, hqr i⟩ |
| 53 | have hq' : Function.Injective q' := fun a b hab => hq (congrArg Subtype.val hab) |
| 54 | exact hlimit q' hq' |
| 55 | |
| 56 | end Poincare.Alexandrov |