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.Comparison.ComponentMetric |
| 2 | import PoincareLib.AlgebraicTopology.HomotopyGroup.LoopSpace.Compatibility.ThreeManifoldTopology |
| 3 | |
| 4 | /-! |
| 5 | # Geometry and orientation of the selected components |
| 6 | |
| 7 | The component restrictions in Morgan--Tian Proposition 15.12 (p. 365) |
| 8 | use the actual ambient metrics. The integral orientation and point paths |
| 9 | are the inputs to the class transport on pp. 430-431. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT |
| 19 | |
| 20 | /-- The metric restriction of Proposition 15.12, p. 365, on the supplied component. -/ |
| 21 | noncomputable def m57ComponentMetric |
| 22 | {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) |
| 23 | (g : RiemannianMetric 3 A.carrier) : RiemannianMetric 3 C.carrier.carrier := |
| 24 | (Classical.choice (m39ComponentMetric C g)).val |
| 25 | |
| 26 | /-- The selected restriction has the exact pullback required on p. 365. -/ |
| 27 | theorem m57ComponentMetric_pullback |
| 28 | {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) |
| 29 | (g : RiemannianMetric 3 A.carrier) (x : C.carrier.carrier) |
| 30 | (v w : TangentSpace (𝓡 3) x) : |
| 31 | g.inner (C.inclusion x) (mfderiv (𝓡 3) (𝓡 3) C.inclusion x v) |
| 32 | (mfderiv (𝓡 3) (𝓡 3) C.inclusion x w) = |
| 33 | (m57ComponentMetric C g).inner x v w := |
| 34 | (Classical.choice (m39ComponentMetric C g)).property x v w |
| 35 | |
| 36 | /-- The selected parent's integral orientation for pp. 430-431, using M02's |
| 37 | top homology calculation with the identical lifted integer coefficient. -/ |
| 38 | theorem m57ComponentOrientation |
| 39 | {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) |
| 40 | [SimplyConnectedSpace C.carrier.carrier] : |
| 41 | Nonempty (surgeryThirdHomology C.carrier.carrier ≃ₗ[ℤ] ULift.{u} ℤ) := by |
| 42 | let : CompactSpace C.carrier.carrier := ⟨C.compact⟩ |
| 43 | obtain ⟨e⟩ := |
| 44 | Proofs.M02.Topology.nonempty_integralThreeManifoldTop_equiv_int C.basepoint |
| 45 | exact ⟨e.trans ULift.moduleEquiv.symm⟩ |
| 46 | |
| 47 | /-- Genuine point paths in the selected component, as required by Definition |
| 48 | 18.2, pp. 419-420, and the based class transport on pp. 430-431. -/ |
| 49 | theorem m57ComponentPointPath |
| 50 | {A : GeneralizedSliceCarrier.{u}} (C : SurgerySelectedComponent A) |
| 51 | (x y : C.carrier.carrier) : Nonempty (Path x y) := by |
| 52 | let : ConnectedSpace C.carrier.carrier := connectedSpace_iff_univ.mpr C.connected |
| 53 | let : LocallyPathConnectedSpace C.carrier.carrier := |
| 54 | ChartedSpace.locallyPathConnectedSpace (EuclideanSpace ℝ (Fin 3)) C.carrier.carrier |
| 55 | let : PathConnectedSpace C.carrier.carrier := |
| 56 | PathConnectedSpace.of_locallyPathConnectedSpace |
| 57 | exact ⟨PathConnectedSpace.somePath x y⟩ |
| 58 | |
| 59 | end PoincareMT |