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.AncientKappa.Compactness.Boundedness.Projective.Topology |
| 2 | import PoincareLib.Topology.Manifold.Orientation.ProjectivePlane.Cover.Projection |
| 3 | import PoincareLib.Topology.Quotient.Coordinates |
| 4 | |
| 5 | /-! |
| 6 | # Actual product collars of projective central sections |
| 7 | |
| 8 | The antipodal quotient of a local cylinder covering is a homeomorphism onto |
| 9 | its actual open slab image. The coordinates retain the given covering map, |
| 10 | so the central projective section is the original central image. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Topology Manifold ContDiff |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | /-- Exact antipodal fibers on a cylinder slab give product coordinates on |
| 23 | the actual open image, with the normal coordinate unchanged. -/ |
| 24 | theorem exists_projectiveCylinderSlab_homeomorph |
| 25 | {M : Type*} [TopologicalSpace M] (f : RoundCylinderSpace → M) {s : ℝ} |
| 26 | (hf : IsLocalHomeomorphOn f (univ ×ˢ Ioo (-s) s)) |
| 27 | (hfiber : ∀ z ∈ univ ×ˢ Ioo (-s) s, ∀ w ∈ univ ×ˢ Ioo (-s) s, |
| 28 | f z = f w ↔ w = z ∨ w = (-z.1, z.2)) : |
| 29 | IsOpen (f '' (univ ×ˢ Ioo (-s) s)) ∧ |
| 30 | ∃ e : (RealProjectiveTwo × Ioo (-s) s) ≃ₜ |
| 31 | (f '' (univ ×ˢ Ioo (-s) s)), |
| 32 | ∀ (q : UnitTwoSphere) (t : Ioo (-s) s), |
| 33 | (e (Quotient.mk realProjectiveTwoSetoid q, t)).val = f (q, t.val) := by |
| 34 | let j : UnitTwoSphere × Ioo (-s) s → RoundCylinderSpace := |
| 35 | fun z => (z.1, z.2.val) |
| 36 | have hj : IsLocalHomeomorph j := |
| 37 | (Topology.IsOpenEmbedding.id.prodMap isOpen_Ioo.isOpenEmbedding_subtypeVal).isLocalHomeomorph |
| 38 | have hfj : IsLocalHomeomorph (f ∘ j) := by |
| 39 | apply isLocalHomeomorph_iff_isLocalHomeomorphOn_univ.mpr |
| 40 | exact hf.comp hj.isLocalHomeomorphOn (fun z _ => ⟨mem_univ _, z.2.property⟩) |
| 41 | have hrange : range (f ∘ j) = f '' (univ ×ˢ Ioo (-s) s) := by |
| 42 | ext x |
| 43 | constructor |
| 44 | · rintro ⟨⟨q, t⟩, rfl⟩ |
| 45 | exact ⟨(q, t.val), ⟨mem_univ _, t.property⟩, rfl⟩ |
| 46 | · rintro ⟨⟨q, t⟩, ht, rfl⟩ |
| 47 | exact ⟨(q, ⟨t, ht.2⟩), rfl⟩ |
| 48 | refine ⟨hrange ▸ hfj.isOpenMap.isOpen_range, ?_⟩ |
| 49 | let F : C(UnitTwoSphere × Ioo (-s) s, f '' (univ ×ˢ Ioo (-s) s)) := |
| 50 | ⟨fun z => ⟨f (j z), ⟨j z, ⟨mem_univ _, z.2.property⟩, rfl⟩⟩, |
| 51 | hfj.continuous.subtype_mk _⟩ |
| 52 | have hF : Topology.IsQuotientMap F := by |
| 53 | have hFo : IsOpenMap F := hfj.isOpenMap.codRestrict |
| 54 | (fun z => (show f (j z) ∈ f '' (univ ×ˢ Ioo (-s) s) from |
| 55 | ⟨j z, ⟨mem_univ _, z.2.property⟩, rfl⟩)) |
| 56 | apply hFo.isQuotientMap F.continuous |
| 57 | rintro ⟨x, ⟨q, t⟩, ht, rfl⟩ |
| 58 | exact ⟨(q, ⟨t, ht.2⟩), rfl⟩ |
| 59 | let Q : C(UnitTwoSphere × Ioo (-s) s, RealProjectiveTwo × Ioo (-s) s) := |
| 60 | ⟨Prod.map (Quotient.mk realProjectiveTwoSetoid) id, |
| 61 | continuous_quotient_mk'.prodMap continuous_id⟩ |
| 62 | have hQ : Topology.IsQuotientMap Q := by |
| 63 | apply IsOpenQuotientMap.isQuotientMap |
| 64 | exact (show IsOpenQuotientMap (Quotient.mk realProjectiveTwoSetoid) from |
| 65 | ⟨Quotient.mk_surjective, continuous_quotient_mk', |
| 66 | Poincare.Topology.Orientation.ProjectivePlane.projectivePlaneProjection_isLocalHomeomorph.isOpenMap⟩).prodMap |
| 67 | ⟨Function.surjective_id, continuous_id, IsOpenMap.id⟩ |
| 68 | have heq : ∀ z w, Q z = Q w ↔ F z = F w := by |
| 69 | intro z w |
| 70 | change (Quotient.mk realProjectiveTwoSetoid z.1, z.2) = |
| 71 | (Quotient.mk realProjectiveTwoSetoid w.1, w.2) ↔ _ |
| 72 | simp only [Prod.mk.injEq, Subtype.ext_iff] |
| 73 | change _ ↔ f (j z) = f (j w) |
| 74 | rw [hfiber (j z) ⟨mem_univ _, z.2.property⟩ (j w) ⟨mem_univ _, w.2.property⟩] |
| 75 | constructor |
| 76 | · rintro ⟨hquot, ht⟩ |
| 77 | rcases Quotient.exact hquot with hq | hq |
| 78 | · exact Or.inl (Prod.ext hq.symm ht.symm) |
| 79 | · right |
| 80 | apply Prod.ext |
| 81 | · change w.1 = -z.1 |
| 82 | rw [hq, neg_neg] |
| 83 | · exact ht.symm |
| 84 | · rintro (h | h) |
| 85 | · have hq := congrArg Prod.fst h |
| 86 | have ht := congrArg Prod.snd h |
| 87 | exact ⟨Quotient.sound (Or.inl hq.symm), ht.symm⟩ |
| 88 | · have hq := congrArg Prod.fst h |
| 89 | have ht := congrArg Prod.snd h |
| 90 | refine ⟨Quotient.sound (Or.inr ?_), ht.symm⟩ |
| 91 | change w.1 = -z.1 at hq |
| 92 | rw [hq, neg_neg] |
| 93 | refine ⟨hQ.homeomorphOfFibers hF heq, ?_⟩ |
| 94 | intro q t |
| 95 | exact congrArg Subtype.val (hQ.homeomorphOfFibers_apply hF heq (q, t)) |
| 96 | |
| 97 | /-- The local diffeomorphisms and closed-slab fibers produced by terminal |
| 98 | projective neck extraction give an actual collar of their compact connected |
| 99 | central image. -/ |
| 100 | theorem exists_projectiveCylinderSlab_collar |
| 101 | {M : Type*} [TopologicalSpace M] |
| 102 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 103 | (f : RoundCylinderSpace → M) {s : ℝ} (hs : 0 < s) |
| 104 | (hf : IsLocalDiffeomorphOn ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ f |
| 105 | (univ ×ˢ Ioo (-s) s)) |
| 106 | (hfiber : ∀ z ∈ univ ×ˢ Icc (-s) s, ∀ w ∈ univ ×ˢ Icc (-s) s, |
| 107 | f z = f w ↔ w = z ∨ w = (-z.1, z.2)) : |
| 108 | IsOpen (f '' (univ ×ˢ Ioo (-s) s)) ∧ |
| 109 | IsCompact (range (fun q : UnitTwoSphere => f (q, 0))) ∧ |
| 110 | IsConnected (range (fun q : UnitTwoSphere => f (q, 0))) ∧ |
| 111 | ∃ e : (RealProjectiveTwo × Ioo (-s) s) ≃ₜ |
| 112 | (f '' (univ ×ˢ Ioo (-s) s)), |
| 113 | (∀ (q : UnitTwoSphere) (t : Ioo (-s) s), |
| 114 | (e (Quotient.mk realProjectiveTwoSetoid q, t)).val = f (q, t.val)) ∧ |
| 115 | range (fun q : RealProjectiveTwo => |
| 116 | (e (q, ⟨0, neg_lt_zero.mpr hs, hs⟩)).val) = |
| 117 | range (fun q : UnitTwoSphere => f (q, 0)) := by |
| 118 | obtain ⟨hopen, e, he⟩ := exists_projectiveCylinderSlab_homeomorph f |
| 119 | hf.isLocalHomeomorphOn (fun z hz w hw => |
| 120 | hfiber z ⟨hz.1, hz.2.1.le, hz.2.2.le⟩ w ⟨hw.1, hw.2.1.le, hw.2.2.le⟩) |
| 121 | have hc : Continuous (fun q : UnitTwoSphere => f (q, 0)) := |
| 122 | hf.isLocalHomeomorphOn.continuousOn.comp_continuous |
| 123 | (continuous_id.prodMk continuous_const) |
| 124 | (fun q => ⟨mem_univ q, neg_lt_zero.mpr hs, hs⟩) |
| 125 | refine ⟨hopen, isCompact_range hc, isConnected_range hc, e, he, ?_⟩ |
| 126 | ext x |
| 127 | constructor |
| 128 | · rintro ⟨q, rfl⟩ |
| 129 | obtain ⟨q, rfl⟩ := Quotient.mk_surjective q |
| 130 | exact ⟨q, (he q ⟨0, neg_lt_zero.mpr hs, hs⟩).symm⟩ |
| 131 | · rintro ⟨q, rfl⟩ |
| 132 | exact ⟨Quotient.mk realProjectiveTwoSetoid q, he q ⟨0, neg_lt_zero.mpr hs, hs⟩⟩ |
| 133 | |
| 134 | end PoincareMT |