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.Comparison.Volume.Precompact |
| 2 | import PoincareLib.Geometry.Riemannian.Comparison.Laplacian.Branch.Complete |
| 3 | import Mathlib.Topology.Order.MonotoneConvergence |
| 4 | |
| 5 | /-! |
| 6 | # Limits of normalized ball volumes |
| 7 | |
| 8 | Bishop--Gromov on complete nonnegatively Ricci-curved manifolds gives a finite |
| 9 | limit of the actual ball volume divided by the radius to the dimension. |
| 10 | Reference: Kleiner--Lott, Appendix E, pp. 2848--2849. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter MeasureTheory |
| 18 | open scoped Manifold ContDiff Topology ENNReal |
| 19 | |
| 20 | namespace PoincareMT.RiemannianMetric |
| 21 | |
| 22 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 23 | [MeasurableSpace M] [BorelSpace M] [T3Space M] [SecondCountableTopology M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 25 | |
| 26 | omit [SecondCountableTopology M] in |
| 27 | theorem ball_volume_ne_top_of_metricComplete |
| 28 | (g : RiemannianMetric n M) (hc : MetricComplete g) (p : M) (r : ℝ) : |
| 29 | g.volumeMeasure (g.ball p r) ≠ ⊤ := by |
| 30 | exact (lt_of_le_of_lt (measure_mono (subset_closure : g.ball p r ⊆ _)) |
| 31 | (g.volumeMeasure_lt_top_of_isCompact |
| 32 | (g.isCompact_closure_ball_of_metricComplete hc p r))).ne |
| 33 | |
| 34 | theorem antitoneOn_ball_volume_div_pow |
| 35 | (g : RiemannianMetric n M) (D : LeviCivitaData g) (hn : 1 ≤ n) |
| 36 | (hc : MetricComplete g) |
| 37 | (hRic : ∀ x : M, ∀ v : TangentSpace (𝓡 n) x, 0 ≤ D.ricci x v v) |
| 38 | (p : M) : |
| 39 | AntitoneOn (fun r : ℝ => (g.volumeMeasure (g.ball p r)).toReal / r ^ n) |
| 40 | (Ioi 0) := by |
| 41 | intro r hr s hs hrs |
| 42 | change 0 < r at hr |
| 43 | change 0 < s at hs |
| 44 | have hm := (g.relativeVolumeComparison_of_precompact_ball p hn |
| 45 | (show 0 < s + 1 by linarith) (le_refl (0 : ℝ)) |
| 46 | (g.isCompact_closure_ball_of_metricComplete hc p (s + 1)) D |
| 47 | (by intro x _ v; simpa only [mul_zero, neg_zero, zero_mul] using hRic x v)).1 |
| 48 | ⟨hr, by linarith⟩ ⟨hs, by linarith⟩ hrs |
| 49 | have hden : ENNReal.ofReal (modelVolume n 0 r) ≠ 0 := |
| 50 | (ENNReal.ofReal_pos.mpr (modelVolume_pos hn (le_refl _) hr)).ne' |
| 51 | have hreal := ENNReal.toReal_mono |
| 52 | (ENNReal.div_ne_top (g.ball_volume_ne_top_of_metricComplete hc p r) hden) hm |
| 53 | rw [ENNReal.toReal_div, ENNReal.toReal_div, |
| 54 | ENNReal.toReal_ofReal (modelVolume_pos hn (le_refl _) hs).le, |
| 55 | ENNReal.toReal_ofReal (modelVolume_pos hn (le_refl _) hr).le, |
| 56 | modelVolume_zero_curvature hn, modelVolume_zero_curvature hn, |
| 57 | mul_comm (euclideanUnitBallVolume n) (s ^ n), |
| 58 | mul_comm (euclideanUnitBallVolume n) (r ^ n), ← div_div, ← div_div] at hreal |
| 59 | exact (div_le_div_iff_of_pos_right (euclideanUnitBallVolume_pos n)).mp hreal |
| 60 | |
| 61 | theorem exists_tendsto_ball_volume_div_pow |
| 62 | (g : RiemannianMetric n M) (D : LeviCivitaData g) (hn : 1 ≤ n) |
| 63 | (hc : MetricComplete g) |
| 64 | (hRic : ∀ x : M, ∀ v : TangentSpace (𝓡 n) x, 0 ≤ D.ricci x v v) |
| 65 | (p : M) : |
| 66 | ∃ V : ℝ, Tendsto |
| 67 | (fun r : ℝ => (g.volumeMeasure (g.ball p r)).toReal / r ^ n) atTop (𝓝 V) := by |
| 68 | let f : ℝ → ℝ := fun r => |
| 69 | (g.volumeMeasure (g.ball p (max 1 r))).toReal / (max 1 r) ^ n |
| 70 | have hf : Antitone f := by |
| 71 | intro r s hrs |
| 72 | exact g.antitoneOn_ball_volume_div_pow D hn hc hRic p |
| 73 | (show max 1 r ∈ Ioi (0 : ℝ) from lt_of_lt_of_le zero_lt_one (le_max_left 1 r)) |
| 74 | (show max 1 s ∈ Ioi (0 : ℝ) from lt_of_lt_of_le zero_lt_one (le_max_left 1 s)) |
| 75 | (max_le_max_left 1 hrs) |
| 76 | have hbdd : BddBelow (range f) := by |
| 77 | refine ⟨0, ?_⟩ |
| 78 | rintro _ ⟨r, rfl⟩ |
| 79 | dsimp only [f] |
| 80 | positivity |
| 81 | refine ⟨_, (tendsto_atTop_ciInf hf hbdd).congr' ?_⟩ |
| 82 | filter_upwards [eventually_ge_atTop (1 : ℝ)] with r hr |
| 83 | simp only [f, max_eq_right hr] |
| 84 | |
| 85 | end PoincareMT.RiemannianMetric |