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.SliceStaticNeck |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.TransportedEndTopology |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.CapGeometry.BoundaryDefiningFunction |
| 5 | |
| 6 | /-! |
| 7 | # The exact quantitative cap on the Chapter 11 slice |
| 8 | |
| 9 | Morgan-Tian Definition 9.72 and Theorem 12.28, pp. 323-324. |
| 10 | Every original cap field is transported through the actual slice |
| 11 | diffeomorphism. The numerical constant, epsilon, exact scalar radii, |
| 12 | strict witnesses, and designated image sets are preserved. |
| 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 | open M35.OrdinaryRealization |
| 23 | |
| 24 | /-- Definition 9.72: the exact ordinary cap supplies a cap on the |
| 25 | genuine generalized-flow slice with every quantitative witness retained. -/ |
| 26 | noncomputable def toOrdinarySlice (P : M35StandardCapPredecessors) |
| 27 | {J : Set ℝ} (F : RicciFlow 3 StandardCapSpace J) {t : ℝ} (ht : t ∈ J) |
| 28 | (N : CapCertificate (F.metric t)) (hconnection : N.connection = F.connection t) : |
| 29 | CapCertificate (metric F t) := by |
| 30 | let e := sliceDiffeomorph ht |
| 31 | let phi := e.symm.toPartialDiffeomorph |
| 32 | have hU : N.carrier ⊆ phi.source := subset_univ _ |
| 33 | have hClosure : closure N.carrier ⊆ phi.source := subset_univ _ |
| 34 | have htop := N.transported_core_topology phi hU |
| 35 | have hopen := htop.1 |
| 36 | have hcompact := htop.2.1 |
| 37 | have hcore := htop.2.2.1 |
| 38 | have hfrontier := htop.2.2.2.1 |
| 39 | have hcomplement := htop.2.2.2.2 |
| 40 | have hend := N.transported_end_attachment phi hClosure |
| 41 | have hendfrontier := hend.1 |
| 42 | have hendclosure := hend.2 |
| 43 | let ne := N.end_neck.toOrdinarySlice P F ht (N.end_neck_connection.trans hconnection) |
| 44 | let nb := N.boundary_neck.toOrdinarySlice P F ht |
| 45 | (N.boundary_neck_connection.trans hconnection) |
| 46 | have hscalar (x : StandardCapSpace) : |
| 47 | (M35.OrdinaryRealization.connection F t).scalarCurvature (e.symm x) = |
| 48 | N.connection.scalarCurvature x := by |
| 49 | rw [hconnection] |
| 50 | exact scalar_eq P F ht x |
| 51 | have hsup (U : Set StandardCapSpace) : |
| 52 | scalarCurvatureSupOn (metric F t) (M35.OrdinaryRealization.connection F t) (e.symm '' U) = |
| 53 | scalarCurvatureSupOn (F.metric t) N.connection U := by |
| 54 | rw [hconnection] |
| 55 | exact slice_scalarSup_image P F ht U |
| 56 | have hvolumeImage (U : Set StandardCapSpace) : |
| 57 | calibratedMetricVolume (metric F t) (e.symm '' U) = |
| 58 | calibratedMetricVolume (F.metric t) U := volume_image P F ht U |
| 59 | refine { |
| 60 | epsilon := N.epsilon |
| 61 | epsilon_pos := N.epsilon_pos |
| 62 | epsilon_le_threshold := N.epsilon_le_threshold |
| 63 | cap_constant := N.cap_constant |
| 64 | cap_constant_pos := N.cap_constant_pos |
| 65 | carrier := e.symm '' N.carrier |
| 66 | carrier_open := hopen |
| 67 | closed_core := e.symm '' N.closed_core |
| 68 | closed_core_compact := hcompact |
| 69 | core := e.symm '' N.core |
| 70 | core_nonempty := N.core_nonempty.image e.symm |
| 71 | core_eq_interior_closed_core := hcore |
| 72 | puncture := N.puncture |
| 73 | model_kind := N.model_kind |
| 74 | model_equivalence := N.model_equivalence.transported phi hU |
| 75 | connection := M35.OrdinaryRealization.connection F t |
| 76 | end_neck := ne |
| 77 | end_neck_epsilon := N.end_neck_epsilon |
| 78 | end_neck_subset := image_mono N.end_neck_subset |
| 79 | end_neck_connection := rfl |
| 80 | closed_core_eq_complement_end := hcomplement |
| 81 | boundary_sphere := e.symm '' N.boundary_sphere |
| 82 | boundary_neck := nb |
| 83 | boundary_neck_epsilon := N.boundary_neck_epsilon |
| 84 | boundary_neck_subset := image_mono N.boundary_neck_subset |
| 85 | boundary_neck_connection := rfl |
| 86 | boundary_eq_neck_sphere := congrArg (image e.symm) N.boundary_eq_neck_sphere |
| 87 | boundary_eq_end_frontier := hendfrontier |
| 88 | boundary_subset_negative_end_closure := ?_ |
| 89 | boundary_subset := image_mono N.boundary_subset |
| 90 | core_frontier_eq_boundary := hfrontier.symm |
| 91 | boundary_local_defining_function := N.transported_boundary_local_defining_function phi hU |
| 92 | scalar_pos := ?_ |
| 93 | intrinsic_diameter_bound := ?_ |
| 94 | scalar_ratio := ?_ |
| 95 | volume_bound := ?_ |
| 96 | core_radius := N.core_radius ∘ e |
| 97 | core_radius_pos := ?_ |
| 98 | core_radius_eq := ?_ |
| 99 | core_ball_subset := ?_ |
| 100 | core_ball_compact := ?_ |
| 101 | core_ball_volume_lower := ?_ |
| 102 | gradient_bound := ?_ |
| 103 | laplacian_bound := ?_ |
| 104 | } |
| 105 | · change e.symm '' N.boundary_sphere ⊆ |
| 106 | closure ((N.end_neck.toOrdinarySlice P F ht |
| 107 | (N.end_neck_connection.trans hconnection)).region (-N.epsilon⁻¹) (-N.epsilon⁻¹ / 2)) |
| 108 | rw [N.end_neck.toOrdinarySlice_region] |
| 109 | exact hendclosure |
| 110 | · rintro _ ⟨x, hx, rfl⟩ |
| 111 | rw [hscalar] |
| 112 | exact N.scalar_pos x hx |
| 113 | · rw [hsup] |
| 114 | exact (slice_intrinsicDiameter_image_le F ht N.carrier_open).trans_lt |
| 115 | N.intrinsic_diameter_bound |
| 116 | · obtain ⟨B, hB, hratio⟩ := N.scalar_ratio |
| 117 | refine ⟨B, hB, ?_⟩ |
| 118 | rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩ |
| 119 | rw [hscalar, hscalar] |
| 120 | exact hratio x hx y hy |
| 121 | · rw [hsup, hvolumeImage] |
| 122 | exact N.volume_bound |
| 123 | · rintro _ ⟨x, hx, rfl⟩ |
| 124 | exact N.core_radius_pos x hx |
| 125 | · rintro _ ⟨x, hx, rfl⟩ |
| 126 | change scalarCurvatureSupOn (metric F t) (M35.OrdinaryRealization.connection F t) |
| 127 | ((metric F t).ball (e.symm x) (N.core_radius x)) = (N.core_radius x)⁻¹ ^ 2 |
| 128 | rw [← slice_ball_image P F ht, hsup] |
| 129 | exact N.core_radius_eq x hx |
| 130 | · rintro _ ⟨x, hx, rfl⟩ |
| 131 | change closure ((metric F t).ball (e.symm x) (N.core_radius x)) ⊆ e.symm '' N.carrier |
| 132 | rw [← slice_closure_ball_image P F ht] |
| 133 | exact image_mono (N.core_ball_subset x hx) |
| 134 | · rintro _ ⟨x, hx, rfl⟩ |
| 135 | change IsCompact (closure ((metric F t).ball (e.symm x) (N.core_radius x))) |
| 136 | rw [← slice_closure_ball_image P F ht] |
| 137 | exact (N.core_ball_compact x hx).image e.symm.continuous |
| 138 | · obtain ⟨B, hB, hvolume⟩ := N.core_ball_volume_lower |
| 139 | refine ⟨B, hB, ?_⟩ |
| 140 | rintro _ ⟨x, hx, rfl⟩ |
| 141 | change ENNReal.ofReal (B * N.core_radius x ^ 3) ≤ |
| 142 | calibratedMetricVolume (metric F t) ((metric F t).ball (e.symm x) (N.core_radius x)) |
| 143 | rw [← slice_ball_image P F ht] |
| 144 | exact (hvolume x hx).trans_eq (hvolumeImage _).symm |
| 145 | · obtain ⟨B, hB, hgradient⟩ := N.gradient_bound |
| 146 | refine ⟨B, hB, ?_⟩ |
| 147 | rintro _ ⟨x, hx, rfl⟩ |
| 148 | rw [slice_scalarGradientNorm_eq P F ht, hscalar, ← hconnection] |
| 149 | exact hgradient x hx |
| 150 | · obtain ⟨B, hB, hevolution⟩ := N.laplacian_bound |
| 151 | refine ⟨B, hB, ?_⟩ |
| 152 | rintro _ ⟨x, hx, rfl⟩ |
| 153 | rw [scalar_evolution_eq P F ht, hscalar, ← hconnection] |
| 154 | exact hevolution x hx |
| 155 | |
| 156 | /-- Theorem 12.28: an actual quantitative ordinary cap gives |
| 157 | the exact Chapter 11 canonical-control cap branch at its core points. -/ |
| 158 | theorem generalized_canonical_control (P : M35StandardCapPredecessors) |
| 159 | {g₀ : StandardInitialMetric} (F : MaximalStandardCapFlow g₀) |
| 160 | {t epsilon C : ℝ} (ht : t ∈ Ico 0 F.base.lifetime) |
| 161 | (N : CapCertificate (F.metric t)) (hepsilon : N.epsilon = epsilon) |
| 162 | (hC : N.cap_constant ≤ C) (hconnection : N.connection = F.connection t) |
| 163 | {x : StandardCapSpace} (hx : x ∈ N.core) : |
| 164 | GeneralizedCanonicalControl (F := generalizedFlow F.base.flow) t |
| 165 | ((sliceDiffeomorph ht).symm x) epsilon C := by |
| 166 | exact .cap (N.toOrdinarySlice P F.base.flow ht hconnection) hepsilon hC rfl |
| 167 | ⟨x, hx, rfl⟩ |
| 168 | |
| 169 | end PoincareMT.CapCertificate |