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.Curvature.Integral.Concentration.VariableRadii |
| 2 | |
| 3 | /-! |
| 4 | # Positive concentration radii from large scalar integrals |
| 5 | |
| 6 | Nonpositive open balls are empty. The finite-center selection can therefore |
| 7 | start with arbitrary bounded radii and select a positive-radius subsequence. |
| 8 | Reference: Petrunin, Section 4.6, author manuscript pp. 12--14. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open Set Filter MeasureTheory |
| 15 | open scoped Manifold ContDiff Bundle Topology |
| 16 | |
| 17 | namespace PoincareMT.LeviCivitaData |
| 18 | |
| 19 | /-- A fixed upper radius bounds the scalar negative-part correction even |
| 20 | when the prescribed radius is nonpositive. -/ |
| 21 | theorem integral_scalarCurvature_posPart_ball_le_integral_add_model_of_le_radius |
| 22 | {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 23 | [MeasurableSpace M] [BorelSpace M] [T3Space M] [PreconnectedSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 25 | {g : RiemannianMetric n M} (D : LeviCivitaData g) (p : M) (hn : 1 ≤ n) |
| 26 | (hcomplete : MetricComplete g) |
| 27 | (hsec : ∀ x (v w : TangentSpace (𝓡 n) x), -1 ≤ D.sectionalCurvature x v w) |
| 28 | {r R : ℝ} (hR : 0 ≤ R) (hrR : r ≤ R) : |
| 29 | (∫ x in g.ball p r, max 0 (D.scalarCurvature x) ∂g.volumeMeasure) ≤ |
| 30 | (∫ x in g.ball p r, D.scalarCurvature x ∂g.volumeMeasure) + |
| 31 | (n : ℝ) ^ 2 * RiemannianMetric.modelVolume n 1 R := by |
| 32 | by_cases hr : 0 < r |
| 33 | · exact (D.integral_scalarCurvature_posPart_ball_le_integral_add_model |
| 34 | p hn hcomplete hsec hr).trans |
| 35 | (add_le_add le_rfl (mul_le_mul_of_nonneg_left |
| 36 | (RiemannianMetric.modelVolume_mono_radius n zero_le_one hr.le hrR) (sq_nonneg _))) |
| 37 | · let : ConnectedSpace M := { toNonempty := ⟨p⟩ } |
| 38 | let := g.toMetricSpace |
| 39 | have he : g.ball p r = ∅ := by |
| 40 | rw [← g.toMetricSpace_ball] |
| 41 | exact Metric.ball_eq_empty.mpr (le_of_not_gt hr) |
| 42 | rw [he, setIntegral_empty, setIntegral_empty, zero_add] |
| 43 | exact mul_nonneg (sq_nonneg _) (RiemannianMetric.modelVolume_nonneg n zero_le_one hR) |
| 44 | |
| 45 | end PoincareMT.LeviCivitaData |
| 46 | |
| 47 | namespace PoincareMT |
| 48 | |
| 49 | /-- Uniformly bounded prescribed radii acquire a positive-radius subsequence |
| 50 | from divergent scalar mass; no positivity premise is needed initially. -/ |
| 51 | theorem exists_subseq_prescribed_center_scalar_integral_tendsto_atTop_with_positive_radii |
| 52 | {n : ℕ} {M : ℕ → Type*} |
| 53 | [∀ j, TopologicalSpace (M j)] [∀ j, T3Space (M j)] |
| 54 | [∀ j, MeasurableSpace (M j)] [∀ j, BorelSpace (M j)] |
| 55 | [∀ j, ChartedSpace (EuclideanSpace ℝ (Fin n)) (M j)] |
| 56 | [∀ j, IsManifold (𝓡 n) ∞ (M j)] [∀ j, PreconnectedSpace (M j)] |
| 57 | {ι : Type*} [Fintype ι] |
| 58 | (g : ∀ j, RiemannianMetric n (M j)) (D : ∀ j, LeviCivitaData (g j)) |
| 59 | (p : ∀ j, M j) (q : ∀ j, ι → M j) (r : ℕ → ι → ℝ) |
| 60 | (hn : 1 ≤ n) {R : ℝ} (hRpos : 0 < R) (hrR : ∀ j i, r j i ≤ R) |
| 61 | (hcomplete : ∀ j, MetricComplete (g j)) |
| 62 | (hsec : ∀ j x (v w : TangentSpace (𝓡 n) x), |
| 63 | -1 ≤ (D j).sectionalCurvature x v w) |
| 64 | (C : ℝ) (houtside : ∀ j, |
| 65 | (∫ x in (g j).ball (p j) 1 \ ⋃ i, (g j).ball (q j i) (r j i), |
| 66 | max 0 ((D j).scalarCurvature x) ∂(g j).volumeMeasure) ≤ C) |
| 67 | (hlarge : ∀ B : ℝ, ∃ j, |
| 68 | B < ∫ x in (g j).ball (p j) 1, (D j).scalarCurvature x ∂(g j).volumeMeasure) : |
| 69 | ∃ i : ι, ∃ phi : ℕ → ℕ, StrictMono phi ∧ |
| 70 | (∀ j, 0 < r (phi j) i) ∧ |
| 71 | Tendsto (fun j => ∫ x in (g (phi j)).ball (q (phi j) i) (r (phi j) i), |
| 72 | (D (phi j)).scalarCurvature x ∂(g (phi j)).volumeMeasure) atTop atTop := by |
| 73 | have hR (j) : Continuous (D j).scalarCurvature := (D j).continuous_scalarCurvature |
| 74 | have hP (j) : Continuous (fun x => max 0 ((D j).scalarCurvature x)) := |
| 75 | continuous_const.sup (hR j) |
| 76 | have hPi (j) (x : M j) (s : ℝ) := |
| 77 | (g j).integrableOn_ball_of_continuous (hcomplete j) (hP j) x s |
| 78 | have hRi (j) (x : M j) (s : ℝ) := |
| 79 | (g j).integrableOn_ball_of_continuous (hcomplete j) (hR j) x s |
| 80 | have hm (j) (x : M j) (s : ℝ) : MeasurableSet ((g j).ball x s) := by |
| 81 | let : MetricSpace (M j) := (g j).toMetricSpace |
| 82 | rw [← (g j).toMetricSpace_ball] |
| 83 | exact Metric.isOpen_ball.measurableSet |
| 84 | have hlargeP : ∀ B : ℝ, ∃ j, B < ∫ x in (g j).ball (p j) 1, |
| 85 | max 0 ((D j).scalarCurvature x) ∂(g j).volumeMeasure := by |
| 86 | intro B |
| 87 | obtain ⟨j, hj⟩ := hlarge B |
| 88 | exact ⟨j, hj.trans_le (integral_mono (hRi j _ _) (hPi j _ _) |
| 89 | (fun x => le_max_right _ _))⟩ |
| 90 | obtain ⟨i, phi, hphi, hdiv⟩ := |
| 91 | Poincare.CurvatureIntegral.exists_subseq_fixed_member_integral_tendsto_atTop |
| 92 | (fun j => (g j).volumeMeasure) (fun j => (g j).ball (p j) 1) |
| 93 | (fun j i => (g j).ball (q j i) (r j i)) |
| 94 | (fun j x => max 0 ((D j).scalarCurvature x)) |
| 95 | (fun j => hm j _ _) (fun j i => hm j _ _) (fun j x => le_max_left _ _) |
| 96 | (fun j => hPi j _ _) (fun j i => hPi j _ _) C houtside hlargeP |
| 97 | have hbound (j : ℕ) := |
| 98 | (D j).integral_scalarCurvature_posPart_ball_le_integral_add_model_of_le_radius |
| 99 | (q j i) hn (hcomplete j) (hsec j) hRpos.le (hrR j i) |
| 100 | have hsigned : Tendsto (fun j => ∫ x in (g (phi j)).ball (q (phi j) i) (r (phi j) i), |
| 101 | (D (phi j)).scalarCurvature x ∂(g (phi j)).volumeMeasure) atTop atTop := by |
| 102 | apply tendsto_atTop.2 |
| 103 | intro B |
| 104 | filter_upwards [(tendsto_atTop.1 hdiv) |
| 105 | (B + (n : ℝ) ^ 2 * RiemannianMetric.modelVolume n 1 R)] with j hj |
| 106 | linarith only [hj, hbound (phi j)] |
| 107 | obtain ⟨J, hJ⟩ := eventually_atTop.mp (hsigned.eventually (eventually_gt_atTop 0)) |
| 108 | refine ⟨i, fun j => phi (j + J), fun a b hab => hphi (Nat.add_lt_add_right hab J), |
| 109 | ?_, hsigned.comp (tendsto_add_atTop_nat J)⟩ |
| 110 | intro j |
| 111 | by_contra! hr |
| 112 | let : ConnectedSpace (M (phi (j + J))) := { toNonempty := ⟨p (phi (j + J))⟩ } |
| 113 | let := (g (phi (j + J))).toMetricSpace |
| 114 | have he : (g (phi (j + J))).ball (q (phi (j + J)) i) (r (phi (j + J)) i) = ∅ := by |
| 115 | rw [← (g (phi (j + J))).toMetricSpace_ball] |
| 116 | exact Metric.ball_eq_empty.mpr hr |
| 117 | have hj := hJ (j + J) (by omega) |
| 118 | rw [he, setIntegral_empty] at hj |
| 119 | exact lt_irrefl _ hj |
| 120 | |
| 121 | end PoincareMT |