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.RicciFlow.ReducedGeometry.ReducedVolume.Minimum.Compactness.EquicontinuousCompactRange |
| 2 | import Mathlib.Analysis.SpecialFunctions.Sqrt |
| 3 | import Mathlib.Topology.Instances.Real.Lemmas |
| 4 | import Mathlib.Topology.Order.IntermediateValue |
| 5 | |
| 6 | /-! |
| 7 | # Constant extensions of curves with a square-root modulus |
| 8 | |
| 9 | Clipping the parameter preserves a uniform energy continuity bound. |
| 10 | Anchored curves with that bound have one compact range in a complete |
| 11 | locally compact metric space, as used in Morgan-Tian Claim 7.11. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter Metric |
| 17 | open scoped Topology |
| 18 | |
| 19 | namespace PoincareMT.ReducedVolume |
| 20 | |
| 21 | variable {X ι : Type*} [MetricSpace X] |
| 22 | |
| 23 | /-- Clipping the parameter of each curve preserves a common square-root modulus. -/ |
| 24 | theorem equicontinuous_clipped_curves {γ : ι → ℝ → X} {S : ι → ℝ} {B K : ℝ} |
| 25 | (hS : ∀ i, 0 ≤ S i) (hK : 0 ≤ K) |
| 26 | (hmod : ∀ i a b, 0 ≤ a → a ≤ b → b ≤ S i → |
| 27 | dist (γ i a) (γ i b) ≤ Real.sqrt (K * (b - a))) : |
| 28 | Equicontinuous (fun i (t : Icc (0 : ℝ) B) ↦ γ i (min (t : ℝ) (S i))) := by |
| 29 | have hlim : Tendsto (fun r : ℝ ↦ Real.sqrt (K * r)) (𝓝 0) (𝓝 0) := by |
| 30 | have ht : Tendsto (fun r : ℝ ↦ K * r) (𝓝 0) (𝓝 (K * 0)) := |
| 31 | tendsto_const_nhds.mul tendsto_id |
| 32 | simpa only [mul_zero, Real.sqrt_zero] using ht.sqrt |
| 33 | apply Metric.equicontinuous_of_continuity_modulus _ hlim |
| 34 | intro s t i |
| 35 | have hordered (a b : Icc (0 : ℝ) B) (hab : (a : ℝ) ≤ b) : |
| 36 | dist (γ i (min (a : ℝ) (S i))) (γ i (min (b : ℝ) (S i))) ≤ |
| 37 | Real.sqrt (K * dist a b) := by |
| 38 | have hab' : min (a : ℝ) (S i) ≤ min (b : ℝ) (S i) := min_le_min_right _ hab |
| 39 | apply (hmod i _ _ (le_min a.property.1 (hS i)) hab' (min_le_right _ _)).trans |
| 40 | apply Real.sqrt_le_sqrt |
| 41 | apply mul_le_mul_of_nonneg_left _ hK |
| 42 | have hclip := (LipschitzWith.id.min_const (S i)).dist_le_mul (a : ℝ) (b : ℝ) |
| 43 | simpa only [id_eq, Subtype.dist_eq, Real.dist_eq, abs_of_nonpos (sub_nonpos.mpr hab), |
| 44 | abs_of_nonpos (sub_nonpos.mpr hab'), NNReal.coe_one, one_mul, neg_sub] using hclip |
| 45 | rcases le_total (s : ℝ) (t : ℝ) with hst | hts |
| 46 | · exact hordered s t hst |
| 47 | · simpa only [dist_comm] using hordered t s hts |
| 48 | |
| 49 | /-- All endpoints of an anchored family with bounded energy lie in one compact set. -/ |
| 50 | theorem exists_compact_clipped_range [CompleteSpace X] [LocallyCompactSpace X] |
| 51 | {γ : ι → ℝ → X} {S : ι → ℝ} {B K : ℝ} (hB : 0 ≤ B) |
| 52 | (hS : ∀ i, 0 ≤ S i) (hSB : ∀ i, S i ≤ B) (hK : 0 ≤ K) |
| 53 | (hmod : ∀ i a b, 0 ≤ a → a ≤ b → b ≤ S i → |
| 54 | dist (γ i a) (γ i b) ≤ Real.sqrt (K * (b - a))) |
| 55 | (p : X) (hanchor : ∀ i, γ i 0 = p) : |
| 56 | ∃ C : Set X, IsCompact C ∧ ∀ i, γ i (S i) ∈ C := by |
| 57 | let : PreconnectedSpace (Icc (0 : ℝ) B) := Subtype.preconnectedSpace isPreconnected_Icc |
| 58 | have hf := equicontinuous_clipped_curves (B := B) hS hK hmod |
| 59 | obtain ⟨C, hC, hrange⟩ := exists_compact_range_of_anchored_equicontinuous |
| 60 | hf (⟨0, le_rfl, hB⟩ : Icc (0 : ℝ) B) p (by |
| 61 | intro i |
| 62 | simpa only [min_eq_left (hS i)] using hanchor i) |
| 63 | refine ⟨C, hC, fun i ↦ ?_⟩ |
| 64 | simpa only [min_self] using hrange i ⟨S i, hS i, hSB i⟩ |
| 65 | |
| 66 | end PoincareMT.ReducedVolume |