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.Noncollapse.Assembly.CapCore |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.Volume.VolumeBoundary |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Assembly.Volume.ModelVolume |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.StableSet.Cylinders.SmallCurvature |
| 5 | |
| 6 | /-! |
| 7 | # Tested-ball volume in a canonical cap |
| 8 | |
| 9 | Morgan--Tian Proposition 16.3, p. 368, and Definition 9.72(7), pp. 230-231. |
| 10 | The actual core-ball volume and pinching give smaller volumes by the local |
| 11 | comparison at the same outer radius. For larger tested radii, the scalar |
| 12 | ratio bounds the loss under ordinary ball inclusion. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set MeasureTheory |
| 18 | open scoped Manifold ContDiff ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M15 |
| 23 | export PoincareMT.Generalized.Noncollapse (calibratedMetricVolume_eq_volumeMeasure) |
| 24 | end PoincareMT.M15 |
| 25 | |
| 26 | namespace PoincareMT.Proofs.M46 |
| 27 | |
| 28 | /-- A fixed model loss for the cap's pinched full-curvature ceiling. -/ |
| 29 | noncomputable def canonicalCapLoss : ℝ := (Real.cosh 8)⁻¹ ^ 2 |
| 30 | |
| 31 | /-- The cap model loss is positive and at most one. -/ |
| 32 | theorem canonicalCapLoss_bounds : 0 < canonicalCapLoss ∧ canonicalCapLoss ≤ 1 := by |
| 33 | refine ⟨pow_pos (inv_pos.mpr (Real.cosh_pos 8)) _, ?_⟩ |
| 34 | exact pow_le_one₀ (inv_nonneg.mpr (Real.cosh_pos 8).le) |
| 35 | ((inv_le_one₀ (Real.cosh_pos 8)).mpr (Real.one_le_cosh 8)) |
| 36 | |
| 37 | /-- The final cap constant is fixed by the setup's upper cap constant. -/ |
| 38 | noncomputable def canonicalCapVolumeFloor (B : ℝ) : ℝ := canonicalCapLoss / (27 * B ^ 4) |
| 39 | |
| 40 | /-- The cap coefficient is positive for every admissible setup bound. -/ |
| 41 | theorem canonicalCapVolumeFloor_pos {B : ℝ} (hB : 1 ≤ B) : |
| 42 | 0 < canonicalCapVolumeFloor B := |
| 43 | div_pos canonicalCapLoss_bounds.1 (mul_pos (by norm_num) |
| 44 | (pow_pos (zero_lt_one.trans_le hB) _)) |
| 45 | |
| 46 | /-- Controlled curvature and the actual outer ball volume give all smaller |
| 47 | volumes, without requiring a curvature buffer beyond that outer ball. -/ |
| 48 | theorem canonical_controlled_ball_volume |
| 49 | {M : Type u} [TopologicalSpace M] [T3Space M] [SecondCountableTopology M] |
| 50 | [MeasurableSpace M] [BorelSpace M] |
| 51 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 52 | (g : RiemannianMetric 3 M) (D : LeviCivitaData g) (x : M) |
| 53 | {A R s k : ℝ} (hA : 0 < A) (hR : 0 < R) (hs : 0 < s) (hsR : s ≤ R) (hk : 0 < k) |
| 54 | (hcompact : IsCompact (closure (g.ball x R))) |
| 55 | (hcurv : ∀ y ∈ g.ball x R, D.curvatureTensorNorm y ≤ (A / R) ^ 2) |
| 56 | (hvolume : ENNReal.ofReal (k * R ^ 3) ≤ calibratedMetricVolume g (g.ball x R)) : |
| 57 | ENNReal.ofReal ((Real.cosh A)⁻¹ ^ 2 * k * s ^ 3) ≤ |
| 58 | calibratedMetricVolume g (g.ball x s) := by |
| 59 | rw [M15.calibratedMetricVolume_eq_volumeMeasure] at hvolume ⊢ |
| 60 | have hcompare := canonical_smallBall_volume_at_boundary g x (by norm_num) |
| 61 | (sq_nonneg (A / R)) hs hsR hcompact D |
| 62 | (fun y hy v => D.ricci_quadratic_lower_bound_of_curvatureTensorNorm_le y (hcurv y hy) v) |
| 63 | apply (ENNReal.ofReal_le_ofReal (scaled_smallBallVolumeBound_ge hA hR hs hk)).trans |
| 64 | unfold RiemannianMetric.smallerBallVolumeBound |
| 65 | rw [ENNReal.ofReal_mul (div_nonneg |
| 66 | (RiemannianMetric.modelVolume_pos (by norm_num : 1 ≤ 3) (sq_nonneg (A / R)) hs).le |
| 67 | (RiemannianMetric.modelVolume_pos (by norm_num : 1 ≤ 3) (sq_nonneg (A / R)) hR).le), |
| 68 | ENNReal.ofReal_div_of_pos |
| 69 | (RiemannianMetric.modelVolume_pos (by norm_num : 1 ≤ 3) (sq_nonneg (A / R)) hR)] |
| 70 | exact (mul_le_mul' le_rfl hvolume).trans hcompare |
| 71 | |
| 72 | /-- Hamilton--Ivey pinching controls precisely the actual core ball. -/ |
| 73 | theorem canonicalCap_core_curvature (P : M46Predecessors.{u}) |
| 74 | {M : Type u} [TopologicalSpace M] [T3Space M] [MeasurableSpace M] [BorelSpace M] |
| 75 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 76 | {g : RiemannianMetric 3 M} (N : CapCertificate g) |
| 77 | {x : M} (hx : x ∈ N.core) {t : ℝ} |
| 78 | (hpinch : SurgeryPinchedAt N.connection t) (hsmall : N.core_radius x ≤ 1 / 200) |
| 79 | {y : M} (hy : y ∈ g.ball x (N.core_radius x)) : |
| 80 | N.connection.curvatureTensorNorm y ≤ (8 / N.core_radius x) ^ 2 := by |
| 81 | have hq := N.core_radius_pos x hx |
| 82 | have hscalar := (canonicalCap_core_scalar_bounds N hx (le_refl N.cap_constant)).1 y hy |
| 83 | have hmax : max (N.connection.scalarCurvature y) (Real.exp 4) ≤ |
| 84 | 4 * (N.core_radius x)⁻¹ ^ 2 := |
| 85 | max_le (hscalar.trans (by nlinarith [sq_nonneg (N.core_radius x)⁻¹])) |
| 86 | (exp_four_le_four_inv_sq hq hsmall) |
| 87 | have hnorm := pinched_curvature_norm_le P hpinch (mem_univ y) |
| 88 | calc |
| 89 | N.connection.curvatureTensorNorm y ≤ 52 * (N.core_radius x)⁻¹ ^ 2 := by nlinarith |
| 90 | _ ≤ 64 * (N.core_radius x)⁻¹ ^ 2 := |
| 91 | mul_le_mul_of_nonneg_right (by norm_num) (sq_nonneg _) |
| 92 | _ = _ := by simp only [div_eq_mul_inv, mul_pow]; norm_num |
| 93 | |
| 94 | /-- The canonical cap supplies cubic volume at every tested radius whose |
| 95 | center satisfies the literal scalar trace bound. -/ |
| 96 | theorem canonicalCap_test_ball_volume (P : M46Predecessors.{u}) |
| 97 | {M : Type u} [TopologicalSpace M] [T3Space M] [SecondCountableTopology M] |
| 98 | [MeasurableSpace M] [BorelSpace M] |
| 99 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 100 | {g : RiemannianMetric 3 M} (N : CapCertificate g) |
| 101 | {x : M} (hx : x ∈ N.core) {t B s : ℝ} |
| 102 | (hB1 : 1 ≤ B) (hB : N.cap_constant ≤ B) (hs : 0 < s) |
| 103 | (hpinch : SurgeryPinchedAt N.connection t) (hsmall : N.core_radius x ≤ 1 / 200) |
| 104 | (hscalar : N.connection.scalarCurvature x ≤ 9 * s⁻¹ ^ 2) : |
| 105 | ENNReal.ofReal (canonicalCapVolumeFloor B * s ^ 3) ≤ calibratedMetricVolume g (g.ball x s) := by |
| 106 | have hBpos : 0 < B := zero_lt_one.trans_le hB1 |
| 107 | have hq := N.core_radius_pos x hx |
| 108 | have hvolume := canonicalCap_core_volume N hx hB |
| 109 | have hloss := canonicalCapLoss_bounds |
| 110 | rcases le_total s (N.core_radius x) with hs_le | hq_le |
| 111 | · have h := canonical_controlled_ball_volume g N.connection x (by norm_num : (0 : ℝ) < 8) |
| 112 | hq hs hs_le (inv_pos.mpr hBpos) (N.core_ball_compact x hx) |
| 113 | (fun y hy => canonicalCap_core_curvature P N hx hpinch hsmall hy) hvolume |
| 114 | apply le_trans (ENNReal.ofReal_le_ofReal _) h |
| 115 | apply mul_le_mul_of_nonneg_right _ (pow_nonneg hs.le 3) |
| 116 | unfold canonicalCapVolumeFloor |
| 117 | change canonicalCapLoss / (27 * B ^ 4) ≤ canonicalCapLoss * B⁻¹ |
| 118 | rw [← div_eq_mul_inv] |
| 119 | apply div_le_div_of_nonneg_left hloss.1.le hBpos |
| 120 | have hpow := one_le_pow₀ hB1 (n := 3) |
| 121 | nlinarith |
| 122 | · have hscale := canonicalCap_test_radius_le N hx hB1 hB hs hscalar |
| 123 | have hcube := pow_le_pow_left₀ hs.le hscale 3 |
| 124 | have hnum : canonicalCapLoss * s ^ 3 ≤ 27 * B ^ 3 * N.core_radius x ^ 3 := by |
| 125 | have h := mul_le_mul_of_nonneg_right hloss.2 (pow_nonneg hs.le 3) |
| 126 | nlinarith |
| 127 | have hbound : canonicalCapVolumeFloor B * s ^ 3 ≤ B⁻¹ * N.core_radius x ^ 3 := by |
| 128 | unfold canonicalCapVolumeFloor |
| 129 | field_simp [hBpos.ne'] |
| 130 | nlinarith |
| 131 | apply (ENNReal.ofReal_le_ofReal hbound).trans |
| 132 | apply hvolume.trans |
| 133 | apply measure_mono |
| 134 | intro y hy |
| 135 | exact hy.trans_le (ENNReal.ofReal_le_ofReal hq_le) |
| 136 | |
| 137 | end PoincareMT.Proofs.M46 |