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.Riemannian.Compactness.Pointed |
| 2 | import PoincareLib.Geometry.Riemannian.Curvature.Bounds.Ricci |
| 3 | import PoincareLib.Geometry.Riemannian.Measure.Basic |
| 4 | |
| 5 | /-! |
| 6 | # Compactness for unbounded scalar-curvature integrals |
| 7 | |
| 8 | Petrunin, Section 1.5, author manuscript p. 3. The one-sided sectional bound |
| 9 | supplies the Ricci bound needed for pointed compactness. A preliminary |
| 10 | extraction preserves divergence of the scalar integrals through compactness. |
| 11 | The Alexandrov comparison and rescaling steps are separate obligations. |
| 12 | -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Filter Topology MeasureTheory |
| 18 | open Poincare.GromovHausdorff |
| 19 | open scoped Manifold ContDiff Bundle ENNReal |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | private theorem exists_strictMono_tendsto_atTop_of_unbounded |
| 24 | (a : ℕ → ℝ) (hlarge : ∀ C : ℝ, ∃ j : ℕ, C < a j) : |
| 25 | ∃ phi : ℕ → ℕ, StrictMono phi ∧ Tendsto (a ∘ phi) atTop atTop := by |
| 26 | classical |
| 27 | have hnext (i k : ℕ) : ∃ j : ℕ, i < j ∧ (k : ℝ) < a j := by |
| 28 | obtain ⟨C, hC⟩ := ((Set.finite_Iic i).image a).bddAbove |
| 29 | obtain ⟨j, hj⟩ := hlarge (max C (k : ℝ)) |
| 30 | refine ⟨j, ?_, (le_max_right _ _).trans_lt hj⟩ |
| 31 | by_contra hji |
| 32 | have := hC ⟨j, not_lt.mp hji, rfl⟩ |
| 33 | exact (not_le_of_gt ((le_max_left _ _).trans_lt hj)) this |
| 34 | choose next hindex hvalue using hnext |
| 35 | let phi : ℕ → ℕ := fun k => Nat.rec (next 0 0) (fun i j => next j (i + 1)) k |
| 36 | have hphi : StrictMono phi := strictMono_nat_of_lt_succ fun k => hindex (phi k) (k + 1) |
| 37 | have hbound (k : ℕ) : (k : ℝ) ≤ a (phi k) := by |
| 38 | cases k with |
| 39 | | zero => exact (hvalue 0 0).le |
| 40 | | succ k => exact (hvalue (phi k) (k + 1)).le |
| 41 | exact ⟨phi, hphi, tendsto_atTop_mono hbound tendsto_natCast_atTop_atTop⟩ |
| 42 | |
| 43 | /-- The compactness reduction in Petrunin's contradiction argument: unbounded |
| 44 | unit-ball scalar integrals admit a pointed convergent subsequence on which the |
| 45 | integrals diverge. The sectional hypothesis is one-sided throughout. -/ |
| 46 | theorem exists_subseq_proper_geodesic_pointed_limit_scalar_integral_tendsto_atTop |
| 47 | {n : ℕ} {M : ℕ → Type} |
| 48 | [∀ j, TopologicalSpace (M j)] [∀ j, T3Space (M j)] |
| 49 | [∀ j, MeasurableSpace (M j)] [∀ j, BorelSpace (M j)] |
| 50 | [∀ j, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M j)] |
| 51 | [∀ j, IsManifold (𝓡 n) ∞ (M j)] [∀ j, PreconnectedSpace (M j)] |
| 52 | (g : ∀ j, PoincareMT.RiemannianMetric n (M j)) (p : ∀ j, M j) |
| 53 | (hn : 1 ≤ n) (hcomplete : ∀ j, PoincareMT.MetricComplete (g j)) |
| 54 | (D : ∀ j, PoincareMT.LeviCivitaData (g j)) |
| 55 | (hsec : ∀ j (x : M j) (v w : TangentSpace (𝓡 n) x), |
| 56 | -1 ≤ (D j).sectionalCurvature x v w) |
| 57 | (hlarge : ∀ C : ℝ, ∃ j : ℕ, |
| 58 | C < ∫ x in (g j).ball (p j) 1, (D j).scalarCurvature x ∂(g j).volumeMeasure) : |
| 59 | ∃ phi : ℕ → ℕ, ∃ S : CompatiblePointedCompactSystem.{0}, |
| 60 | StrictMono phi ∧ ProperSpace S.completedLimit.carrier ∧ |
| 61 | (∀ x y : S.completedLimit.carrier, ∃ γ : ℝ → S.completedLimit.carrier, |
| 62 | γ 0 = x ∧ γ 1 = y ∧ |
| 63 | ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |
| 64 | dist (γ s) (γ t) = |s - t| * dist x y) ∧ |
| 65 | PointedGHConvergesUnbounded |
| 66 | (fun j => (g (phi j)).toBasedMetricSpace (p (phi j))) S.completedLimit ∧ |
| 67 | Tendsto |
| 68 | (fun j => ∫ x in (g (phi j)).ball (p (phi j)) 1, |
| 69 | (D (phi j)).scalarCurvature x ∂(g (phi j)).volumeMeasure) |
| 70 | atTop atTop := by |
| 71 | obtain ⟨psi, hpsi, hdiv⟩ := exists_strictMono_tendsto_atTop_of_unbounded |
| 72 | (fun j => ∫ x in (g j).ball (p j) 1, (D j).scalarCurvature x ∂(g j).volumeMeasure) |
| 73 | hlarge |
| 74 | have hRic : ∀ j x v, |
| 75 | -(((n : ℝ) - 1) * 1) * (g j).inner x v v ≤ (D j).ricci x v v := by |
| 76 | intro j x v |
| 77 | exact (D j).ricci_quadratic_lower_bound_of_sectionalCurvature_lower_bound |
| 78 | x 1 (hsec j x) v |
| 79 | obtain ⟨theta, S, htheta, hproper, hgeodesic, hconverges⟩ := |
| 80 | RiemannianMetric.exists_subseq_proper_geodesic_pointed_limit_of_ricci_lower_bound |
| 81 | (fun j => g (psi j)) (fun j => p (psi j)) hn 1 (by norm_num) |
| 82 | (fun j => hcomplete (psi j)) (fun j => D (psi j)) (fun j => hRic (psi j)) |
| 83 | exact ⟨psi ∘ theta, S, hpsi.comp htheta, hproper, hgeodesic, hconverges, |
| 84 | hdiv.comp htheta.tendsto_atTop⟩ |
| 85 | |
| 86 | end PoincareMT |