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.Generalized.BoundedDistance.GeometryImports |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Persistence.CapTopology.NeckRegions |
| 3 | |
| 4 | /-! |
| 5 | # Guarded ambient extensions of neck axial maps |
| 6 | |
| 7 | The actual neck coordinate maps extend a real axial map by identity |
| 8 | outside the neck. Every coordinate identity and smoothness statement |
| 9 | below is guarded by membership in the valid neck strip. This is the |
| 10 | ambient gluing step of Morgan--Tian Proposition 9.79, pp. 232-234; |
| 11 | see the M28 cap-topology ambient-gluing derivation. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.EpsilonNeck |
| 22 | |
| 23 | variable {M : Type u} [TopologicalSpace M] |
| 24 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 25 | [IsManifold (𝓡 3) ∞ M] {g : RiemannianMetric 3 M} |
| 26 | |
| 27 | /-- Extend an axial map through the actual neck coordinates, using the |
| 28 | identity elsewhere. No meaning is assigned to off-strip coordinates. -/ |
| 29 | noncomputable def axialMap (N : EpsilonNeck g) (β : ℝ → ℝ) (x : M) : M := by |
| 30 | classical |
| 31 | exact if x ∈ N.carrier then |
| 32 | N.coordinate_map ((N.coordinate_inverse x).1, β (N.coordinate_inverse x).2) else x |
| 33 | |
| 34 | /-- The guarded map has its displayed coordinate formula on the neck. -/ |
| 35 | theorem axialMap_of_mem (N : EpsilonNeck g) (β : ℝ → ℝ) {x : M} |
| 36 | (hx : x ∈ N.carrier) : |
| 37 | N.axialMap β x = N.coordinate_map |
| 38 | ((N.coordinate_inverse x).1, β (N.coordinate_inverse x).2) := by |
| 39 | simp only [axialMap, if_pos hx] |
| 40 | |
| 41 | /-- The guarded map is identity outside the neck. -/ |
| 42 | theorem axialMap_of_not_mem (N : EpsilonNeck g) (β : ℝ → ℝ) {x : M} |
| 43 | (hx : x ∉ N.carrier) : N.axialMap β x = x := by |
| 44 | simp only [axialMap, if_neg hx] |
| 45 | |
| 46 | /-- A fixed axial height fixes the actual ambient neck point. -/ |
| 47 | theorem axialMap_eq_self_of_fixed_height (N : EpsilonNeck g) (β : ℝ → ℝ) {x : M} |
| 48 | (hx : x ∈ N.carrier) (hfix : β (N.coordinate_inverse x).2 = (N.coordinate_inverse x).2) : |
| 49 | N.axialMap β x = x := by |
| 50 | rw [N.axialMap_of_mem β hx, hfix] |
| 51 | exact N.coordinate_map_coordinate_inverse hx |
| 52 | |
| 53 | /-- Valid transformed heights give actual membership in the indicated |
| 54 | neck region (Proposition 9.79, pp. 232-234). -/ |
| 55 | theorem axialMap_mem_region (N : EpsilonNeck g) (β : ℝ → ℝ) {x : M} |
| 56 | (hx : x ∈ N.carrier) {a b : ℝ} (ha : -N.epsilon⁻¹ ≤ a) (hb : b ≤ N.epsilon⁻¹) |
| 57 | (hβx : β (N.coordinate_inverse x).2 ∈ Ioo a b) : |
| 58 | N.axialMap β x ∈ N.region a b := by |
| 59 | have ht : β (N.coordinate_inverse x).2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := |
| 60 | ⟨ha.trans_lt hβx.1, hβx.2.trans_le hb⟩ |
| 61 | rw [N.axialMap_of_mem β hx] |
| 62 | refine ⟨N.coordinate_map_mem_of_axial _ ht, ?_⟩ |
| 63 | rw [N.coordinate_inverse_coordinate_map_of_axial |
| 64 | ((N.coordinate_inverse x).1, β (N.coordinate_inverse x).2) ht] |
| 65 | exact hβx |
| 66 | |
| 67 | /-- Inverse axial values give an actual ambient inverse identity as |
| 68 | long as the intermediate coordinate remains in the neck strip. -/ |
| 69 | theorem axialMap_comp_eq (N : EpsilonNeck g) (β γ : ℝ → ℝ) {x : M} |
| 70 | (hx : x ∈ N.carrier) |
| 71 | (hβx : β (N.coordinate_inverse x).2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) |
| 72 | (hinv : γ (β (N.coordinate_inverse x).2) = (N.coordinate_inverse x).2) : |
| 73 | N.axialMap γ (N.axialMap β x) = x := by |
| 74 | rw [N.axialMap_of_mem β hx, |
| 75 | N.axialMap_of_mem γ (N.coordinate_map_mem_of_axial _ hβx), |
| 76 | N.coordinate_inverse_coordinate_map_of_axial _ hβx] |
| 77 | change N.coordinate_map ((N.coordinate_inverse x).1, |
| 78 | γ (β (N.coordinate_inverse x).2)) = x |
| 79 | rw [hinv] |
| 80 | exact N.coordinate_map_coordinate_inverse hx |
| 81 | |
| 82 | /-- A smooth axial map gives actual ambient smoothness at every valid |
| 83 | neck point whose image height stays in the coordinate strip. -/ |
| 84 | theorem contMDiffAt_axialMap (N : EpsilonNeck g) {β : ℝ → ℝ} |
| 85 | (hβ : ContDiff ℝ ∞ β) {x : M} (hx : x ∈ N.carrier) |
| 86 | (hβx : β (N.coordinate_inverse x).2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) : |
| 87 | ContMDiffAt (𝓡 3) (𝓡 3) ∞ (N.axialMap β) x := by |
| 88 | let ψ := fun z : UnitTwoSphere × ℝ => (z.1, β z.2) |
| 89 | have hψ : ContMDiff ((𝓡 2).prod 𝓘(ℝ, ℝ)) ((𝓡 2).prod 𝓘(ℝ, ℝ)) ∞ ψ := |
| 90 | contMDiff_fst.prodMk (hβ.contMDiff.comp contMDiff_snd) |
| 91 | have hc : ContMDiffAt ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ N.coordinate_map |
| 92 | (ψ (N.coordinate_inverse x)) := N.coordinate_map_smooth.contMDiffAt |
| 93 | ((isOpen_univ.prod isOpen_Ioo).mem_nhds ⟨mem_univ _, hβx⟩) |
| 94 | have hi := N.coordinate_inverse_smooth.contMDiffAt (N.carrier_open.mem_nhds hx) |
| 95 | apply (hc.comp x (hψ.contMDiffAt.comp x hi)).congr_of_eventuallyEq |
| 96 | filter_upwards [N.carrier_open.mem_nhds hx] with y hy |
| 97 | exact N.axialMap_of_mem β hy |
| 98 | |
| 99 | end PoincareMT.EpsilonNeck |