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.NeckCollar |
| 3 | |
| 4 | /-! |
| 5 | # Signed regions in the original neck coordinates |
| 6 | |
| 7 | Morgan--Tian, Proposition A.11, pp. 503--504. A sign records which actual |
| 8 | old end the source path uses. These sets retain the original coordinate |
| 9 | map; negative sign merely exchanges the two numerical interval bounds. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M28 |
| 20 | |
| 21 | variable {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 23 | [IsManifold (𝓡 3) ∞ M] {g : RiemannianMetric 3 M} |
| 24 | |
| 25 | /-- An interval in the signed original axial coordinate. No replacement |
| 26 | neck or altered coordinate map is constructed. -/ |
| 27 | def neckSignedRegion (N : EpsilonNeck g) (sigma a b : ℝ) : Set M := |
| 28 | {x | x ∈ N.carrier ∧ a < sigma * (N.coordinate_inverse x).2 ∧ |
| 29 | sigma * (N.coordinate_inverse x).2 < b} |
| 30 | |
| 31 | /-- Positive sign retains the literal old neck region. -/ |
| 32 | theorem neckSignedRegion_one (N : EpsilonNeck g) (a b : ℝ) : |
| 33 | neckSignedRegion N 1 a b = N.region a b := by |
| 34 | ext x |
| 35 | simp only [neckSignedRegion, EpsilonNeck.region, mem_ofPred_eq, one_mul] |
| 36 | |
| 37 | /-- Negative sign exchanges and negates the literal interval endpoints. -/ |
| 38 | theorem neckSignedRegion_neg_one (N : EpsilonNeck g) (a b : ℝ) : |
| 39 | neckSignedRegion N (-1) a b = N.region (-b) (-a) := by |
| 40 | ext x |
| 41 | simp only [neckSignedRegion, EpsilonNeck.region, mem_ofPred_eq, neg_one_mul, |
| 42 | lt_neg, neg_lt] |
| 43 | exact ⟨fun h => ⟨h.1, h.2.2, h.2.1⟩, fun h => ⟨h.1, h.2.2, h.2.1⟩⟩ |
| 44 | |
| 45 | /-- The signed original coordinate is still in the same open axial strip. -/ |
| 46 | theorem neck_signed_axis_mem (N : EpsilonNeck g) {sigma : ℝ} |
| 47 | (hsigma : sigma = 1 ∨ sigma = -1) {x : M} (hx : x ∈ N.carrier) : |
| 48 | sigma * (N.coordinate_inverse x).2 ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹ := by |
| 49 | have h := (N.coordinate_inverse_mem x hx).2 |
| 50 | rcases hsigma with rfl | rfl |
| 51 | · simpa only [one_mul] using h |
| 52 | · constructor <;> nlinarith [h.1, h.2] |
| 53 | |
| 54 | /-- Signed interval regions are actually open in the ambient manifold. -/ |
| 55 | theorem isOpen_neckSignedRegion (N : EpsilonNeck g) (sigma a b : ℝ) : |
| 56 | IsOpen (neckSignedRegion N sigma a b) := by |
| 57 | have h : ContinuousOn (fun x => sigma * (N.coordinate_inverse x).2) N.carrier := |
| 58 | continuousOn_const.mul |
| 59 | (continuous_snd.comp_continuousOn N.coordinate_inverse_smooth.continuousOn) |
| 60 | exact h.isOpen_inter_preimage N.carrier_open isOpen_Ioo |
| 61 | |
| 62 | /-- A signed interval in the actual strip is preconnected, by the |
| 63 | already-proved literal neck-region theorem. -/ |
| 64 | theorem isPreconnected_neckSignedRegion (N : EpsilonNeck g) {sigma a b : ℝ} |
| 65 | (hsigma : sigma = 1 ∨ sigma = -1) |
| 66 | (ha : -N.epsilon⁻¹ ≤ a) (hb : b ≤ N.epsilon⁻¹) : |
| 67 | IsPreconnected (neckSignedRegion N sigma a b) := by |
| 68 | rcases hsigma with rfl | rfl |
| 69 | · rw [neckSignedRegion_one] |
| 70 | exact N.isPreconnected_region ha hb |
| 71 | · rw [neckSignedRegion_neg_one] |
| 72 | exact N.isPreconnected_region (by linarith) (by linarith) |
| 73 | |
| 74 | /-- Membership in the literal old sphere slice is exactly its signed |
| 75 | height equation, provided the point is in the actual old carrier. -/ |
| 76 | theorem mem_neck_slice_iff_signed_axis (N : EpsilonNeck g) {sigma a : ℝ} |
| 77 | (hsigma : sigma = 1 ∨ sigma = -1) |
| 78 | (ha : sigma * a ∈ Ioo (-N.epsilon⁻¹) N.epsilon⁻¹) |
| 79 | {x : M} (hx : x ∈ N.carrier) : |
| 80 | x ∈ range (fun p : UnitTwoSphere => N.coordinate_map (p, sigma * a)) ↔ |
| 81 | sigma * (N.coordinate_inverse x).2 = a := by |
| 82 | constructor |
| 83 | · rintro ⟨p, rfl⟩ |
| 84 | rw [N.coordinate_inverse_coordinate_map ⟨mem_univ _, ha⟩] |
| 85 | rcases hsigma with rfl | rfl <;> ring |
| 86 | · intro heq |
| 87 | have haxis : (N.coordinate_inverse x).2 = sigma * a := by |
| 88 | rcases hsigma with rfl | rfl <;> nlinarith |
| 89 | refine ⟨(N.coordinate_inverse x).1, ?_⟩ |
| 90 | rw [← haxis] |
| 91 | exact N.coordinate_map_coordinate_inverse hx |
| 92 | |
| 93 | end PoincareMT.M28 |