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.SliceCapGeometry |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.Transport.TransportedNeckPatch |
| 4 | |
| 5 | /-! |
| 6 | # Exact static necks on the Chapter 11 slice |
| 7 | |
| 8 | Morgan-Tian Definition 2.16 in Theorem 12.28, pp. 323-324. |
| 9 | The valid-slice diffeomorphism transports the entire given static neck, |
| 10 | preserving its epsilon, scale, designated center, and original end sets. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | namespace PoincareMT.EpsilonNeck |
| 19 | |
| 20 | open M35.OrdinaryRealization |
| 21 | |
| 22 | /-- Definition 2.16: exact static neck transport to the actual |
| 23 | Chapter 11 slice, with the same scale and every image set retained. -/ |
| 24 | noncomputable def toOrdinarySlice (P : M35StandardCapPredecessors) |
| 25 | {J : Set ℝ} (F : RicciFlow 3 StandardCapSpace J) {t : ℝ} (ht : t ∈ J) |
| 26 | (N : EpsilonNeck (F.metric t)) (hconnection : N.connection = F.connection t) : |
| 27 | EpsilonNeck (metric F t) := by |
| 28 | let e := sliceDiffeomorph ht |
| 29 | let U := e.symm '' N.carrier |
| 30 | have himage (y : (slice J t).carrier) (hy : y ∈ U) : e y ∈ N.carrier := by |
| 31 | rcases hy with ⟨x, hx, rfl⟩ |
| 32 | exact hx |
| 33 | let c : NeckDomain N.epsilon ≃ₜ U := N.coordinate.trans |
| 34 | (e.symm.toHomeomorph.subtype (p := fun x => x ∈ N.carrier) |
| 35 | (q := fun y => y ∈ U) (fun x => by |
| 36 | constructor |
| 37 | · intro hx |
| 38 | exact ⟨x, hx, rfl⟩ |
| 39 | · rintro ⟨z, hz, heq⟩ |
| 40 | exact e.symm.injective heq ▸ hz)) |
| 41 | have hscalar : (M35.OrdinaryRealization.connection F t).scalarCurvature (e.symm N.center) = |
| 42 | N.connection.scalarCurvature N.center := by |
| 43 | rw [hconnection] |
| 44 | exact scalar_eq P F ht N.center |
| 45 | refine { |
| 46 | epsilon := N.epsilon |
| 47 | epsilon_pos := N.epsilon_pos |
| 48 | epsilon_lt_half := N.epsilon_lt_half |
| 49 | scale := N.scale |
| 50 | scale_pos := N.scale_pos |
| 51 | center := e.symm N.center |
| 52 | connection := M35.OrdinaryRealization.connection F t |
| 53 | scalar_center_pos := hscalar.symm ▸ N.scalar_center_pos |
| 54 | scale_eq_scalar := N.scale_eq_scalar.trans (congrArg (fun r : ℝ => r ^ (-1 / 2 : ℝ)) |
| 55 | hscalar.symm) |
| 56 | carrier := U |
| 57 | carrier_open := e.symm.toHomeomorph.isOpenMap _ N.carrier_open |
| 58 | coordinate := c |
| 59 | coordinate_map := e.symm ∘ N.coordinate_map |
| 60 | coordinate_map_eq := fun z => congrArg e.symm (N.coordinate_map_eq z) |
| 61 | coordinate_map_smooth := e.symm.contMDiff.comp_contMDiffOn N.coordinate_map_smooth |
| 62 | coordinate_inverse := N.coordinate_inverse ∘ e |
| 63 | coordinate_inverse_mem := fun y hy => N.coordinate_inverse_mem (e y) (himage y hy) |
| 64 | coordinate_inverse_left := ?_ |
| 65 | coordinate_inverse_right := ?_ |
| 66 | coordinate_inverse_smooth := N.coordinate_inverse_smooth.comp e.contMDiff.contMDiffOn |
| 67 | (fun y hy => himage y hy) |
| 68 | central_sphere := e.symm '' N.central_sphere |
| 69 | central_sphere_eq := by rw [N.central_sphere_eq, image_image]; rfl |
| 70 | center_on_central_sphere := mem_image_of_mem e.symm N.center_on_central_sphere |
| 71 | central_sphere_subset := image_mono N.central_sphere_subset |
| 72 | metric_comparison := ?_ |
| 73 | } |
| 74 | · intro z |
| 75 | change N.coordinate_inverse (e (e.symm (N.coordinate z).val)) = (z.1, z.2.val) |
| 76 | rw [e.apply_symm_apply] |
| 77 | exact N.coordinate_inverse_left z |
| 78 | · intro y hy |
| 79 | apply Subtype.ext |
| 80 | change e.symm (N.coordinate ((N.coordinate_inverse (e y)).1, |
| 81 | ⟨(N.coordinate_inverse (e y)).2, _⟩)).val = y |
| 82 | exact (congrArg e.symm (congrArg Subtype.val |
| 83 | (N.coordinate_inverse_right (e y) (himage y hy)))).trans (e.symm_apply_apply y) |
| 84 | · constructor |
| 85 | change RoundCylinderClose N.epsilon 0 (fun z v w => N.scale⁻¹ ^ 2 * |
| 86 | roundCylinderPullback (metric F t) |
| 87 | ((sliceDiffeomorph ht).symm ∘ N.coordinate_map) z v w) |
| 88 | rw [slice_roundCylinderPullback] |
| 89 | exact N.metric_comparison.close |
| 90 | |
| 91 | /-- Definition 9.72: the exact image of each axial end region is |
| 92 | retained under the valid-slice neck identification. -/ |
| 93 | theorem toOrdinarySlice_region (P : M35StandardCapPredecessors) |
| 94 | {J : Set ℝ} (F : RicciFlow 3 StandardCapSpace J) {t : ℝ} (ht : t ∈ J) |
| 95 | (N : EpsilonNeck (F.metric t)) (hconnection : N.connection = F.connection t) |
| 96 | (a b : ℝ) : |
| 97 | (N.toOrdinarySlice P F ht hconnection).region a b = |
| 98 | (sliceDiffeomorph ht).symm '' N.region a b := by |
| 99 | ext y |
| 100 | constructor |
| 101 | · rintro ⟨⟨x, hx, rfl⟩, hax, hxb⟩ |
| 102 | exact ⟨x, ⟨hx, hax, hxb⟩, rfl⟩ |
| 103 | · rintro ⟨x, ⟨hx, hax, hxb⟩, rfl⟩ |
| 104 | exact ⟨⟨x, hx, rfl⟩, hax, hxb⟩ |
| 105 | |
| 106 | end PoincareMT.EpsilonNeck |