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.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.TransportedStaticNeck |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.TransportedEndTopology |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.BoundaryDefiningFunction |
| 5 | |
| 6 | /-! |
| 7 | # The actual transported static cap certificate |
| 8 | |
| 9 | Morgan-Tian Definition 9.72 in Theorem 12.28, pp. 323-324. |
| 10 | The full original cap topology and scalar-normalized necks are combined |
| 11 | with the quantitative bounds on the selected original flow. The fixed |
| 12 | constant retains explicit strict slack for the noncollapse clause. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology ENNReal |
| 19 | |
| 20 | namespace PoincareMT.CapCertificate |
| 21 | |
| 22 | variable {M : Type} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 24 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 25 | {g : RiemannianMetric 3 M} |
| 26 | |
| 27 | /-- Definition 9.72 in Theorem 12.28: retaining both entire necks |
| 28 | and the actual selected curvature balls gives a cap with the explicit |
| 29 | uniform constant `8 * N.cap_constant + 16 / kappa`. -/ |
| 30 | theorem exists_transported_certificate (N : CapCertificate g) |
| 31 | (h : RiemannianMetric 3 StandardCapSpace) (D : LeviCivitaData h) |
| 32 | (phi : PartialDiffeomorph (𝓡 3) (𝓡 3) M StandardCapSpace ∞) |
| 33 | (hClosure : closure N.carrier ⊆ phi.source) |
| 34 | (kappa : ℝ) (hkappa : 0 < kappa) |
| 35 | (hscalar : ∀ p ∈ phi '' N.carrier, 0 < D.scalarCurvature p) |
| 36 | (hend : RoundCylinderClose N.epsilon 0 (fun z v w => |
| 37 | D.scalarCurvature (phi N.end_neck.center) * roundCylinderPullback h |
| 38 | (phi ∘ N.end_neck.coordinate_map) z v w)) |
| 39 | (hboundary : RoundCylinderClose N.epsilon 0 (fun z v w => |
| 40 | D.scalarCurvature (phi N.boundary_neck.center) * roundCylinderPullback h |
| 41 | (phi ∘ N.boundary_neck.coordinate_map) z v w)) |
| 42 | (hdiameter : intrinsicDiameter h (phi '' N.carrier) < |
| 43 | ENNReal.ofReal (2 * N.cap_constant * |
| 44 | scalarCurvatureSupOn h D (phi '' N.carrier) ^ (-1 / 2 : ℝ))) |
| 45 | (hratio : ∃ B : ℝ, B < N.cap_constant ∧ |
| 46 | ∀ p ∈ phi '' N.carrier, ∀ q ∈ phi '' N.carrier, |
| 47 | D.scalarCurvature q ≤ B * D.scalarCurvature p) |
| 48 | (hvolume : calibratedMetricVolume h (phi '' N.carrier) < |
| 49 | ENNReal.ofReal (8 * N.cap_constant * |
| 50 | scalarCurvatureSupOn h D (phi '' N.carrier) ^ (-3 / 2 : ℝ))) |
| 51 | (hradius : ∀ p ∈ phi '' N.core, ∃ r : ℝ, 0 < r ∧ |
| 52 | scalarCurvatureSupOn h D (h.ball p r) = r⁻¹ ^ 2 ∧ |
| 53 | closure (h.ball p r) ⊆ phi '' N.carrier ∧ IsCompact (closure (h.ball p r))) |
| 54 | (hballvolume : ∀ p ∈ phi '' N.core, ∀ r : ℝ, 0 < r → |
| 55 | scalarCurvatureSupOn h D (h.ball p r) = r⁻¹ ^ 2 → |
| 56 | ENNReal.ofReal (kappa / 8 * r ^ 3) ≤ calibratedMetricVolume h (h.ball p r)) |
| 57 | (hgradient : ∀ p ∈ phi '' N.carrier, |
| 58 | scalarGradientNorm h D p ≤ 8 * N.cap_constant * D.scalarCurvature p ^ (3 / 2 : ℝ)) |
| 59 | (hevolution : ∀ p ∈ phi '' N.carrier, |
| 60 | |D.laplacian D.scalarCurvature p + 2 * D.ricciNormSq p| ≤ |
| 61 | 8 * N.cap_constant * D.scalarCurvature p ^ 2) : |
| 62 | ∃ C : CapCertificate h, |
| 63 | C.epsilon = N.epsilon ∧ C.cap_constant = 8 * N.cap_constant + 16 / kappa ∧ |
| 64 | C.connection = D ∧ C.carrier = phi '' N.carrier ∧ C.core = phi '' N.core ∧ |
| 65 | C.closed_core = phi '' N.closed_core ∧ C.boundary_sphere = phi '' N.boundary_sphere ∧ |
| 66 | C.model_kind = N.model_kind := by |
| 67 | classical |
| 68 | have hU : N.carrier ⊆ phi.source := subset_closure.trans hClosure |
| 69 | have heU : N.end_neck.carrier ⊆ phi.source := N.end_neck_subset.trans hU |
| 70 | have hbU : N.boundary_neck.carrier ⊆ phi.source := N.boundary_neck_subset.trans hU |
| 71 | have hepos : 0 < D.scalarCurvature (phi N.end_neck.center) := hscalar _ |
| 72 | ⟨_, N.end_neck_subset |
| 73 | (N.end_neck.central_sphere_subset N.end_neck.center_on_central_sphere), rfl⟩ |
| 74 | have hbpos : 0 < D.scalarCurvature (phi N.boundary_neck.center) := hscalar _ |
| 75 | ⟨_, N.boundary_neck_subset |
| 76 | (N.boundary_neck.central_sphere_subset N.boundary_neck.center_on_central_sphere), rfl⟩ |
| 77 | have heclose : RoundCylinderClose N.end_neck.epsilon 0 (fun z v w => |
| 78 | D.scalarCurvature (phi N.end_neck.center) * roundCylinderPullback h |
| 79 | (phi ∘ N.end_neck.coordinate_map) z v w) := by |
| 80 | simpa only [N.end_neck_epsilon] using hend |
| 81 | have hbclose : RoundCylinderClose N.boundary_neck.epsilon 0 (fun z v w => |
| 82 | D.scalarCurvature (phi N.boundary_neck.center) * roundCylinderPullback h |
| 83 | (phi ∘ N.boundary_neck.coordinate_map) z v w) := by |
| 84 | simpa only [N.boundary_neck_epsilon] using hboundary |
| 85 | let ne := N.end_neck.transportedStatic h D phi heU hepos heclose |
| 86 | let nb := N.boundary_neck.transportedStatic h D phi hbU hbpos hbclose |
| 87 | have hecarrier : ne.carrier = phi '' N.end_neck.carrier := |
| 88 | N.end_neck.transportedStatic_carrier h D phi heU hepos heclose |
| 89 | have hbcarrier : nb.carrier = phi '' N.boundary_neck.carrier := |
| 90 | N.boundary_neck.transportedStatic_carrier h D phi hbU hbpos hbclose |
| 91 | obtain ⟨hopen, hcompact, hcore, hfrontier, hcomplement⟩ := N.transported_core_topology phi hU |
| 92 | obtain ⟨hendfrontier, hendclosure⟩ := N.transported_end_attachment phi hClosure |
| 93 | let c := 8 * N.cap_constant + 16 / kappa |
| 94 | have hNpos := N.cap_constant_pos |
| 95 | have hslack : 0 < 16 / kappa := div_pos (by norm_num) hkappa |
| 96 | have hc : 0 < c := by dsimp [c]; positivity |
| 97 | have h8c : 8 * N.cap_constant < c := by dsimp [c]; linarith |
| 98 | have h2c : 2 * N.cap_constant ≤ c := by |
| 99 | dsimp [c] |
| 100 | linarith [N.cap_constant_pos] |
| 101 | have hNc : N.cap_constant < c := by |
| 102 | dsimp [c] |
| 103 | linarith [N.cap_constant_pos] |
| 104 | have hinverse : c⁻¹ < kappa / 8 := by |
| 105 | apply (inv_lt_iff_one_lt_mul₀ hc).mpr |
| 106 | have hcancel : (kappa / 8) * (16 / kappa) = 2 := by |
| 107 | field_simp |
| 108 | ring |
| 109 | have hpositive : 0 < (kappa / 8) * (8 * N.cap_constant) := by |
| 110 | positivity |
| 111 | dsimp [c] |
| 112 | rw [mul_add, hcancel] |
| 113 | linarith |
| 114 | let rho (p : StandardCapSpace) : ℝ := |
| 115 | if hp : p ∈ phi '' N.core then Classical.choose (hradius p hp) else 1 |
| 116 | have hrho (p : StandardCapSpace) (hp : p ∈ phi '' N.core) : |
| 117 | 0 < rho p ∧ scalarCurvatureSupOn h D (h.ball p (rho p)) = (rho p)⁻¹ ^ 2 ∧ |
| 118 | closure (h.ball p (rho p)) ⊆ phi '' N.carrier ∧ |
| 119 | IsCompact (closure (h.ball p (rho p))) := by |
| 120 | simpa only [rho, dif_pos hp] using Classical.choose_spec (hradius p hp) |
| 121 | let C : CapCertificate h := { |
| 122 | epsilon := N.epsilon |
| 123 | epsilon_pos := N.epsilon_pos |
| 124 | epsilon_le_threshold := N.epsilon_le_threshold |
| 125 | cap_constant := c |
| 126 | cap_constant_pos := hc |
| 127 | carrier := phi '' N.carrier |
| 128 | carrier_open := hopen |
| 129 | closed_core := phi '' N.closed_core |
| 130 | closed_core_compact := hcompact |
| 131 | core := phi '' N.core |
| 132 | core_nonempty := N.core_nonempty.image phi |
| 133 | core_eq_interior_closed_core := hcore |
| 134 | puncture := N.puncture |
| 135 | model_kind := N.model_kind |
| 136 | model_equivalence := N.model_equivalence.transported phi hU |
| 137 | connection := D |
| 138 | end_neck := ne |
| 139 | end_neck_epsilon := N.end_neck_epsilon |
| 140 | end_neck_subset := by rw [hecarrier]; exact image_mono N.end_neck_subset |
| 141 | end_neck_connection := rfl |
| 142 | closed_core_eq_complement_end := by rw [hecarrier]; exact hcomplement |
| 143 | boundary_sphere := phi '' N.boundary_sphere |
| 144 | boundary_neck := nb |
| 145 | boundary_neck_epsilon := N.boundary_neck_epsilon |
| 146 | boundary_neck_subset := by rw [hbcarrier]; exact image_mono N.boundary_neck_subset |
| 147 | boundary_neck_connection := rfl |
| 148 | boundary_eq_neck_sphere := by |
| 149 | change phi '' N.boundary_sphere = |
| 150 | (N.boundary_neck.transportedStatic h D phi hbU hbpos hbclose).central_sphere |
| 151 | rw [N.boundary_neck.transportedStatic_central_sphere, N.boundary_eq_neck_sphere] |
| 152 | boundary_eq_end_frontier := by rw [hecarrier]; exact hendfrontier |
| 153 | boundary_subset_negative_end_closure := by |
| 154 | change phi '' N.boundary_sphere ⊆ closure |
| 155 | ((N.end_neck.transportedStatic h D phi heU hepos heclose).region |
| 156 | (-N.epsilon⁻¹) (-N.epsilon⁻¹ / 2)) |
| 157 | rw [N.end_neck.transportedStatic_region] |
| 158 | exact hendclosure |
| 159 | boundary_subset := image_mono N.boundary_subset |
| 160 | core_frontier_eq_boundary := hfrontier.symm |
| 161 | boundary_local_defining_function := N.transported_boundary_local_defining_function phi hU |
| 162 | scalar_pos := hscalar |
| 163 | intrinsic_diameter_bound := by |
| 164 | rw [ENNReal.ofReal_mul hc.le] |
| 165 | rw [ENNReal.ofReal_mul (by positivity : 0 ≤ 2 * N.cap_constant)] at hdiameter |
| 166 | apply hdiameter.trans_le |
| 167 | gcongr |
| 168 | scalar_ratio := by |
| 169 | obtain ⟨B, hB, hratioB⟩ := hratio |
| 170 | exact ⟨B, hB.trans hNc, hratioB⟩ |
| 171 | volume_bound := by |
| 172 | rw [ENNReal.ofReal_mul (by positivity : 0 ≤ 8 * N.cap_constant)] at hvolume |
| 173 | apply hvolume.trans_le |
| 174 | gcongr |
| 175 | core_radius := rho |
| 176 | core_radius_pos := fun p hp => (hrho p hp).1 |
| 177 | core_radius_eq := fun p hp => (hrho p hp).2.1 |
| 178 | core_ball_subset := fun p hp => (hrho p hp).2.2.1 |
| 179 | core_ball_compact := fun p hp => (hrho p hp).2.2.2 |
| 180 | core_ball_volume_lower := ⟨kappa / 8, hinverse, |
| 181 | fun p hp => hballvolume p hp (rho p) (hrho p hp).1 (hrho p hp).2.1⟩ |
| 182 | gradient_bound := ⟨8 * N.cap_constant, h8c, hgradient⟩ |
| 183 | laplacian_bound := ⟨8 * N.cap_constant, h8c, hevolution⟩ |
| 184 | } |
| 185 | exact ⟨C, rfl, rfl, rfl, rfl, rfl, rfl, rfl, rfl⟩ |
| 186 | |
| 187 | end PoincareMT.CapCertificate |