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.Soliton.Models.Cylinder |
| 2 | import PoincareLib.Geometry.Manifold.InverseFunction.LocalDiffeomorph |
| 3 | import PoincareLib.Geometry.Riemannian.Coordinates.Transitions |
| 4 | import PoincareLib.Topology.Quotient.Coordinates |
| 5 | |
| 6 | /-! |
| 7 | # Coordinates on the projective-plane cylinder quotient |
| 8 | |
| 9 | The quotient map supplied by the frozen shrinking-cylinder certificate is a |
| 10 | local diffeomorphism because its differential preserves a positive metric. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.QuotientSphereLineCertificate |
| 21 | |
| 22 | variable {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 24 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 25 | [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] |
| 26 | {S : GradientShrinkingSolitonData 3 M} {G : ShrinkingSolitonFlow S} |
| 27 | |
| 28 | /-- The given geometric quotient projection is a local diffeomorphism. -/ |
| 29 | theorem quotient_map_localDiffeomorph (q : QuotientSphereLineCertificate G) : |
| 30 | letI := q.cover_topology |
| 31 | letI := q.cover_charted |
| 32 | letI := q.cover_manifold |
| 33 | letI := q.product.surface_topology |
| 34 | letI := q.product.product_charted |
| 35 | letI := q.product.product_manifold |
| 36 | letI := q.quotient_topology |
| 37 | letI := q.quotient_charted |
| 38 | letI := q.quotient_manifold |
| 39 | IsLocalDiffeomorph (𝓡 3) (𝓡 3) ∞ q.quotient_map := by |
| 40 | let := q.cover_topology |
| 41 | let := q.cover_charted |
| 42 | let := q.cover_manifold |
| 43 | let := q.product.surface_topology |
| 44 | let := q.product.product_charted |
| 45 | let := q.product.product_manifold |
| 46 | let := q.quotient_topology |
| 47 | let := q.quotient_charted |
| 48 | let := q.quotient_manifold |
| 49 | apply Poincare.isLocalDiffeomorph_of_contMDiff_bijective_mfderiv q.quotient_map_smooth |
| 50 | intro p |
| 51 | exact (q.product.product_metric (-1)).mfderiv_bijective_of_pullback_eq |
| 52 | (q.quotient_metric (-1)) p |
| 53 | (fun v w ↦ (q.quotient_metric_pullback (-1) (by norm_num) p v w).symm) |
| 54 | |
| 55 | /-- The topology on the supplied quotient carrier is the quotient topology. -/ |
| 56 | theorem quotient_map_isOpenQuotientMap (q : QuotientSphereLineCertificate G) : |
| 57 | letI := q.cover_topology |
| 58 | letI := q.cover_charted |
| 59 | letI := q.cover_manifold |
| 60 | letI := q.product.surface_topology |
| 61 | letI := q.product.product_charted |
| 62 | letI := q.product.product_manifold |
| 63 | letI := q.quotient_topology |
| 64 | letI := q.quotient_charted |
| 65 | letI := q.quotient_manifold |
| 66 | IsOpenQuotientMap q.quotient_map := by |
| 67 | let := q.cover_topology |
| 68 | let := q.cover_charted |
| 69 | let := q.cover_manifold |
| 70 | let := q.product.surface_topology |
| 71 | let := q.product.product_charted |
| 72 | let := q.product.product_manifold |
| 73 | let := q.quotient_topology |
| 74 | let := q.quotient_charted |
| 75 | let := q.quotient_manifold |
| 76 | exact ⟨q.quotient_map_surjective, q.quotient_map_smooth.continuous, |
| 77 | q.quotient_map_localDiffeomorph.isOpenMap⟩ |
| 78 | |
| 79 | /-- An antipodal-times-identity action gives commuting projective-product |
| 80 | coordinates on the supplied quotient carrier. The explicit setoid argument |
| 81 | allows application to the frozen projective-plane definition. -/ |
| 82 | theorem exists_projectivePlaneCoordinates (r : Setoid UnitTwoSphere) |
| 83 | (hr : ∀ x y, r x y ↔ x = y ∨ x = -y) |
| 84 | (q : QuotientSphereLineCertificate G) : |
| 85 | letI := q.cover_topology |
| 86 | letI := q.cover_charted |
| 87 | letI := q.cover_manifold |
| 88 | letI := q.product.surface_topology |
| 89 | letI := q.product.surface_charted |
| 90 | letI := q.product.surface_manifold |
| 91 | letI := q.product.product_charted |
| 92 | letI := q.product.product_manifold |
| 93 | letI := q.quotient_topology |
| 94 | letI := q.quotient_charted |
| 95 | letI := q.quotient_manifold |
| 96 | (∀ p : q.product.surface × ℝ, |
| 97 | q.involution p = (q.product.surface_sphere.symm (-(q.product.surface_sphere p.1)), p.2)) → |
| 98 | ∃ e : q.quotient_carrier ≃ₜ (Quotient r × ℝ), ∀ p : q.product.surface × ℝ, |
| 99 | e (q.quotient_map p) = (Quotient.mk r (q.product.surface_sphere p.1), p.2) := by |
| 100 | let := q.cover_topology |
| 101 | let := q.cover_charted |
| 102 | let := q.cover_manifold |
| 103 | let := q.product.surface_topology |
| 104 | let := q.product.surface_charted |
| 105 | let := q.product.surface_manifold |
| 106 | let := q.product.product_charted |
| 107 | let := q.product.product_manifold |
| 108 | let := q.quotient_topology |
| 109 | let := q.quotient_charted |
| 110 | let := q.quotient_manifold |
| 111 | intro hformula |
| 112 | let E : q.product.surface × ℝ ≃ₜ UnitTwoSphere × ℝ := |
| 113 | q.product.surface_sphere.toHomeomorph.prodCongr (Homeomorph.refl ℝ) |
| 114 | let proj : UnitTwoSphere × ℝ → Quotient r × ℝ := Prod.map (Quotient.mk r) id |
| 115 | have hproj : IsOpenQuotientMap proj := |
| 116 | (Poincare.Topology.isOpenQuotientMap_of_pair_fibers r Neg.neg continuous_neg hr).prodMap |
| 117 | IsOpenQuotientMap.id |
| 118 | have hc : IsOpenQuotientMap (proj ∘ E) := hproj.comp E.isOpenQuotientMap |
| 119 | let f : C(q.product.surface × ℝ, q.quotient_carrier) := |
| 120 | ⟨q.quotient_map, q.quotient_map_smooth.continuous⟩ |
| 121 | let c : C(q.product.surface × ℝ, Quotient r × ℝ) := ⟨proj ∘ E, hc.continuous⟩ |
| 122 | have hf : Topology.IsQuotientMap f := q.quotient_map_isOpenQuotientMap.isQuotientMap |
| 123 | have hcf : ∀ p p', f p = f p' ↔ c p = c p' := by |
| 124 | intro p p' |
| 125 | change q.quotient_map p = q.quotient_map p' ↔ |
| 126 | (Quotient.mk r (q.product.surface_sphere p.1), p.2) = |
| 127 | (Quotient.mk r (q.product.surface_sphere p'.1), p'.2) |
| 128 | rw [q.quotient_fiber_eq_orbit, hformula p] |
| 129 | constructor |
| 130 | · rintro (rfl | rfl) |
| 131 | · rfl |
| 132 | · apply Prod.ext |
| 133 | · apply Quotient.sound |
| 134 | apply (hr _ _).mpr |
| 135 | right |
| 136 | simp |
| 137 | · rfl |
| 138 | · intro h |
| 139 | have hs := Quotient.exact (congrArg Prod.fst h) |
| 140 | have hl := congrArg Prod.snd h |
| 141 | rcases (hr _ _).mp hs with hs | hs |
| 142 | · left |
| 143 | exact Prod.ext (q.product.surface_sphere.injective hs.symm) hl.symm |
| 144 | · right |
| 145 | apply Prod.ext |
| 146 | · apply q.product.surface_sphere.injective |
| 147 | rw [hs] |
| 148 | simp |
| 149 | · exact hl.symm |
| 150 | refine ⟨hf.homeomorphOfFibers hc.isQuotientMap hcf, ?_⟩ |
| 151 | intro p |
| 152 | exact hf.homeomorphOfFibers_apply hc.isQuotientMap hcf p |
| 153 | |
| 154 | end PoincareMT.QuotientSphereLineCertificate |