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.Surgery.Induction.Schedules.StandardGeometry.CanonicalConstants |
| 2 | |
| 3 | /-! |
| 4 | # Uniform analytic bounds for a standard cap |
| 5 | |
| 6 | Morgan--Tian Definition 9.72, pp. 230-231, and Section 15.1.1, p. 354. |
| 7 | The source's extra unit in the canonical constant turns pointwise strict |
| 8 | bounds into the uniform strict bounds of the common cap certificate. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 14 | |
| 15 | namespace PoincareMT.StandardCapNeighborhood |
| 16 | |
| 17 | variable {atlas : StandardCylinderAtlas} {g₀ : StandardInitialMetric} |
| 18 | {F : MaximalStandardCapFlow g₀} {t epsilon C : ℝ} {x : StandardCapSpace} |
| 19 | |
| 20 | /-- The extra unit makes the intrinsic diameter bound strict after taking |
| 21 | the supremum over pairs. Definition 9.72(4), pp. 230-231. -/ |
| 22 | theorem intrinsicDiameter_lt_add_one |
| 23 | (N : StandardCapNeighborhood atlas F t epsilon C x) : |
| 24 | intrinsicDiameter (F.metric t) N.carrier < |
| 25 | ENNReal.ofReal ((C + 1) * |
| 26 | scalarCurvatureSupOn (F.metric t) (F.connection t) N.carrier ^ (-1 / 2 : ℝ)) := by |
| 27 | have hp := Real.rpow_pos_of_pos N.scalarSup_pos (-1 / 2 : ℝ) |
| 28 | have hdiam : intrinsicDiameter (F.metric t) N.carrier ≤ |
| 29 | ENNReal.ofReal (C * |
| 30 | scalarCurvatureSupOn (F.metric t) (F.connection t) N.carrier ^ (-1 / 2 : ℝ)) := by |
| 31 | apply sSup_le |
| 32 | rintro _ ⟨⟨y, z⟩, rfl⟩ |
| 33 | exact (N.diameter_bound y.1 y.2 z.1 z.2).le |
| 34 | apply hdiam.trans_lt |
| 35 | apply (ENNReal.ofReal_lt_ofReal_iff (mul_pos (by linarith [N.constant_pos]) hp)).2 |
| 36 | nlinarith |
| 37 | |
| 38 | /-- The old pointwise scalar-ratio constant is a uniform witness strictly |
| 39 | below the enlarged constant. Definition 9.72(5), pp. 230-231. -/ |
| 40 | theorem scalarRatio_uniform (N : StandardCapNeighborhood atlas F t epsilon C x) : |
| 41 | ∃ bound : ℝ, bound < C + 1 ∧ ∀ y ∈ N.carrier, ∀ z ∈ N.carrier, |
| 42 | (F.connection t).scalarCurvature z ≤ bound * (F.connection t).scalarCurvature y := by |
| 43 | exact ⟨C, by linarith, fun y hy z hz => (N.scalar_ratio y hy z hz).le⟩ |
| 44 | |
| 45 | /-- The total-volume estimate has the product form of Definition 9.72(6), |
| 46 | pp. 230-231, at the enlarged constant. -/ |
| 47 | theorem volume_lt_add_one (N : StandardCapNeighborhood atlas F t epsilon C x) : |
| 48 | calibratedMetricVolume (F.metric t) N.carrier < ENNReal.ofReal (C + 1) * |
| 49 | ENNReal.ofReal |
| 50 | (scalarCurvatureSupOn (F.metric t) (F.connection t) N.carrier ^ (-3 / 2 : ℝ)) := by |
| 51 | rw [← ENNReal.ofReal_mul (by linarith [N.constant_pos] : 0 ≤ C + 1)] |
| 52 | exact N.volume_bound.trans_le (ENNReal.ofReal_le_ofReal |
| 53 | (mul_le_mul_of_nonneg_right (by linarith : C ≤ C + 1) |
| 54 | (Real.rpow_nonneg N.scalarSup_pos.le _))) |
| 55 | |
| 56 | /-- Choose the actual scalar-normalized core-ball radii, with one uniform |
| 57 | lower-volume witness above the new reciprocal. Definition 9.72(7), p. 231. -/ |
| 58 | theorem exists_uniform_coreRadii (N : StandardCapNeighborhood atlas F t epsilon C x) : |
| 59 | ∃ radius : StandardCapSpace → ℝ, |
| 60 | (∀ y ∈ interior N.closed_core, 0 < radius y) ∧ |
| 61 | (∀ y ∈ interior N.closed_core, |
| 62 | scalarCurvatureSupOn (F.metric t) (F.connection t) |
| 63 | ((F.metric t).ball y (radius y)) = (radius y)⁻¹ ^ 2) ∧ |
| 64 | (∀ y ∈ interior N.closed_core, |
| 65 | closure ((F.metric t).ball y (radius y)) ⊆ N.carrier) ∧ |
| 66 | (∀ y ∈ interior N.closed_core, |
| 67 | IsCompact (closure ((F.metric t).ball y (radius y)))) ∧ |
| 68 | ∃ bound : ℝ, (C + 1)⁻¹ < bound ∧ |
| 69 | ∀ y ∈ interior N.closed_core, |
| 70 | ENNReal.ofReal (bound * radius y ^ 3) ≤ |
| 71 | calibratedMetricVolume (F.metric t) ((F.metric t).ball y (radius y)) := by |
| 72 | classical |
| 73 | let radius : StandardCapSpace → ℝ := fun y => |
| 74 | if hy : y ∈ interior N.closed_core then (N.core_ball y hy).choose else 1 |
| 75 | have hspec (y : StandardCapSpace) (hy : y ∈ interior N.closed_core) : |
| 76 | 0 < radius y ∧ |
| 77 | scalarCurvatureSupOn (F.metric t) (F.connection t) |
| 78 | ((F.metric t).ball y (radius y)) = (radius y)⁻¹ ^ 2 ∧ |
| 79 | closure ((F.metric t).ball y (radius y)) ⊆ N.carrier ∧ |
| 80 | IsCompact (closure ((F.metric t).ball y (radius y))) ∧ |
| 81 | ENNReal.ofReal (C⁻¹ * radius y ^ 3) < |
| 82 | calibratedMetricVolume (F.metric t) ((F.metric t).ball y (radius y)) := by |
| 83 | simpa only [radius, dif_pos hy] using (N.core_ball y hy).choose_spec |
| 84 | refine ⟨radius, fun y hy => (hspec y hy).1, fun y hy => (hspec y hy).2.1, |
| 85 | fun y hy => (hspec y hy).2.2.1, fun y hy => (hspec y hy).2.2.2.1, |
| 86 | C⁻¹, ?_, fun y hy => (hspec y hy).2.2.2.2.le⟩ |
| 87 | exact (inv_lt_inv₀ (by linarith [N.constant_pos]) N.constant_pos).2 (by linarith) |
| 88 | |
| 89 | /-- One constant bounds every scalar gradient before the added unit. |
| 90 | Definition 9.72(8), p. 231. -/ |
| 91 | theorem gradient_uniform (N : StandardCapNeighborhood atlas F t epsilon C x) : |
| 92 | ∃ bound : ℝ, bound < C + 1 ∧ ∀ y ∈ N.carrier, |
| 93 | scalarGradientNorm (F.metric t) (F.connection t) y ≤ |
| 94 | bound * (F.connection t).scalarCurvature y ^ (3 / 2 : ℝ) := by |
| 95 | exact ⟨C, by linarith, fun y hy => (N.gradient_bound y hy).le⟩ |
| 96 | |
| 97 | /-- The absolute spatial scalar-evolution expression has a uniform |
| 98 | witness below the enlarged constant. Definition 9.72(8), p. 231. -/ |
| 99 | theorem scalarEvolution_uniform (N : StandardCapNeighborhood atlas F t epsilon C x) : |
| 100 | ∃ bound : ℝ, bound < C + 1 ∧ ∀ y ∈ N.carrier, |
| 101 | |(F.connection t).laplacian (F.connection t).scalarCurvature y + |
| 102 | 2 * (F.connection t).ricciNormSq y| ≤ |
| 103 | bound * (F.connection t).scalarCurvature y ^ 2 := by |
| 104 | exact ⟨C, by linarith, fun y hy => (N.time_derivative_bound y hy).le⟩ |
| 105 | |
| 106 | end PoincareMT.StandardCapNeighborhood |