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.CanonicalInduction.Generalized.GeneralizedBridgeCoordinates |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.Transport.TransportedNeckPatch |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Uniqueness.Blowup.Cylinder.Geometry.CylinderLocality |
| 4 | |
| 5 | /-! |
| 6 | # The actual neck in a regular slice preimage |
| 7 | |
| 8 | All original coordinate data, the complete carrier and central sphere |
| 9 | are transported by the supplied M33 inverse. Scalar normalization and |
| 10 | every metric jet retain their exact values and original epsilon. |
| 11 | Source: Morgan--Tian Definition 2.16, Definition 9.78 and Proposition 14.12. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M47 |
| 23 | |
| 24 | variable {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 25 | (H : M33RegularHistoryData W) {t : ℝ} (ht : t ∈ H.generalized.interval) |
| 26 | |
| 27 | /-- An entire actual neck in the regular region lifts with identical |
| 28 | epsilon, scale and full coordinate metric comparison. -/ |
| 29 | noncomputable def regular_history_static_neck |
| 30 | (N : EpsilonNeck (F.metric t)) (hconnection : N.connection = F.connection t) |
| 31 | (hU : N.carrier ⊆ range (H.history.forward t ht)) : |
| 32 | EpsilonNeck (H.generalized.metric t) := by |
| 33 | let f := H.history.forward t ht |
| 34 | let i := H.history.inverse t ht |
| 35 | let E := regular_history_preimage_homeomorph H ht N.carrier hU |
| 36 | have hcenter : N.center ∈ N.carrier := |
| 37 | N.central_sphere_subset N.center_on_central_sphere |
| 38 | have hscalar : (H.generalized.connection t).scalarCurvature (i N.center) = |
| 39 | N.connection.scalarCurvature N.center := by |
| 40 | rw [← H.scalar_pullback t ht, H.history.right_inverse t ht (hU hcenter), hconnection] |
| 41 | have hmaps : MapsTo N.coordinate_map (univ ×ˢ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) |
| 42 | (range f) := fun _ hz => hU (N.coordinatePartialDiffeomorph.map_source hz) |
| 43 | refine { |
| 44 | epsilon := N.epsilon |
| 45 | epsilon_pos := N.epsilon_pos |
| 46 | epsilon_lt_half := N.epsilon_lt_half |
| 47 | scale := N.scale |
| 48 | scale_pos := N.scale_pos |
| 49 | center := i N.center |
| 50 | connection := H.generalized.connection t |
| 51 | scalar_center_pos := hscalar.symm ▸ N.scalar_center_pos |
| 52 | scale_eq_scalar := hscalar.symm ▸ N.scale_eq_scalar |
| 53 | carrier := f ⁻¹' N.carrier |
| 54 | carrier_open := N.carrier_open.preimage (H.history.forward_smooth t ht).continuous |
| 55 | coordinate := N.coordinate.trans E.symm |
| 56 | coordinate_map := i ∘ N.coordinate_map |
| 57 | coordinate_map_eq := ?_ |
| 58 | coordinate_map_smooth := (H.history.inverse_smooth t ht).comp N.coordinate_map_smooth hmaps |
| 59 | coordinate_inverse := N.coordinate_inverse ∘ f |
| 60 | coordinate_inverse_mem := fun x hx => N.coordinate_inverse_mem (f x) hx |
| 61 | coordinate_inverse_left := ?_ |
| 62 | coordinate_inverse_right := ?_ |
| 63 | coordinate_inverse_smooth := N.coordinate_inverse_smooth.comp |
| 64 | (H.history.forward_smooth t ht).contMDiffOn (fun _ hx => hx) |
| 65 | central_sphere := i '' N.central_sphere |
| 66 | central_sphere_eq := by rw [image_comp, N.central_sphere_eq] |
| 67 | center_on_central_sphere := mem_image_of_mem i N.center_on_central_sphere |
| 68 | central_sphere_subset := ?_ |
| 69 | metric_comparison := ?_ |
| 70 | } |
| 71 | · intro z |
| 72 | change i (N.coordinate z).val = i (N.coordinate_map (z.1, z.2.val)) |
| 73 | exact congrArg i (N.coordinate_map_eq z) |
| 74 | · intro z |
| 75 | change N.coordinate_inverse (f (i (N.coordinate z).val)) = (z.1, z.2.val) |
| 76 | dsimp only [f, i] |
| 77 | rw [H.history.right_inverse t ht (hU (N.coordinate z).property)] |
| 78 | exact N.coordinate_inverse_left z |
| 79 | · intro x hx |
| 80 | apply Subtype.ext |
| 81 | change i (N.coordinate ((N.coordinate_inverse (f x)).1, |
| 82 | ⟨(N.coordinate_inverse (f x)).2, (N.coordinate_inverse_mem (f x) hx).2⟩)).val = x |
| 83 | rw [N.coordinate_inverse_right (f x) hx] |
| 84 | exact H.history.left_inverse t ht x |
| 85 | · rintro _ ⟨y, hy, rfl⟩ |
| 86 | change f (i y) ∈ N.carrier |
| 87 | dsimp only [f, i] |
| 88 | rw [H.history.right_inverse t ht (hU (N.central_sphere_subset hy))] |
| 89 | exact N.central_sphere_subset hy |
| 90 | · have heq : ∀ z : RoundCylinderSpace, z.2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ → |
| 91 | ∀ v w, N.scale⁻¹ ^ 2 * roundCylinderPullback (F.metric t) N.coordinate_map z v w = |
| 92 | N.scale⁻¹ ^ 2 * roundCylinderPullback (H.generalized.metric t) |
| 93 | (i ∘ N.coordinate_map) z v w := by |
| 94 | intro z hz v w |
| 95 | rw [regular_history_coordinate_pullback H ht (isOpen_univ.prod isOpen_Ioo) |
| 96 | N.coordinate_map N.coordinate_map_smooth hmaps z ⟨mem_univ _, hz⟩ v w] |
| 97 | obtain ⟨hsmooth, B, hB, hbound⟩ := N.metric_comparison.close |
| 98 | refine ⟨M35.cylinder_smooth_congr heq hsmooth, B, hB, ?_⟩ |
| 99 | intro z hz |
| 100 | rw [← M35.cylinder_jet_congr heq 0 _ z hz] |
| 101 | exact hbound z hz |
| 102 | end PoincareMT.M47 |