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.StandardCap.Uniqueness.Imports |
| 2 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Ancient.Products |
| 3 | import Mathlib.Geometry.Manifold.VectorField.Pullback |
| 4 | import Mathlib.Geometry.Manifold.MFDeriv.SpecificFunctions |
| 5 | |
| 6 | /-! |
| 7 | # The actual reflected deck map reverses the axial field component |
| 8 | |
| 9 | This uses the literal M27 cover and its frozen involution. Any field from |
| 10 | the quotient lifts equivariantly, so its line component changes sign at |
| 11 | the two reflected points. The line is not fixed by this deck action. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open VectorField |
| 18 | open scoped Manifold ContDiff Bundle Topology |
| 19 | |
| 20 | namespace PoincareMT.M35 |
| 21 | |
| 22 | local notation "V" => EuclideanSpace ℝ (Fin 3) |
| 23 | local notation "Ip" => ModelWithCorners.prod (𝓡 2) 𝓘(ℝ, ℝ) |
| 24 | |
| 25 | /-- The second component of the actual differential is literal reflection. -/ |
| 26 | theorem twistedProductInvolution_mfderiv_snd |
| 27 | (hs : ContMDiff Ip Ip ∞ m27TwistedProductInvolution) |
| 28 | (p : UnitTwoSphere × ℝ) (v : TangentSpace Ip p) : |
| 29 | (mfderiv Ip Ip m27TwistedProductInvolution p v).2 = -v.2 := by |
| 30 | have hc := mfderiv_comp_apply p |
| 31 | (mdifferentiableAt_snd (I := 𝓡 2) (I' := 𝓘(ℝ, ℝ))) |
| 32 | (hs.mdifferentiable (by simp) p) v |
| 33 | have he : Prod.snd ∘ m27TwistedProductInvolution = |
| 34 | fun p : UnitTwoSphere × ℝ => -p.2 := rfl |
| 35 | change @Eq ℝ _ _ at hc |
| 36 | rw [he] at hc |
| 37 | change (mfderiv Ip 𝓘(ℝ, ℝ) (-Prod.snd) p v : ℝ) = |
| 38 | mfderiv Ip 𝓘(ℝ, ℝ) Prod.snd (m27TwistedProductInvolution p) |
| 39 | (mfderiv Ip Ip m27TwistedProductInvolution p v) at hc |
| 40 | rw [mfderiv_neg, mfderiv_snd, mfderiv_snd] at hc |
| 41 | exact hc.symm |
| 42 | |
| 43 | variable {M : Type*} [TopologicalSpace M] [ChartedSpace V M] |
| 44 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 45 | [T2Space M] [T3Space M] [SecondCountableTopology M] [ConnectedSpace M] |
| 46 | {K : AncientKappaSolution 3 M} |
| 47 | |
| 48 | /-- The frozen quotient fibers give the actual deck identity. -/ |
| 49 | theorem twisted_cover_comp_involution (N : M27TwistedSphereLineFlowCertificate K) : |
| 50 | N.cover ∘ m27TwistedProductInvolution = N.cover := by |
| 51 | funext p |
| 52 | exact ((N.cover_fibers p (m27TwistedProductInvolution p)).mpr (Or.inr rfl)).symm |
| 53 | |
| 54 | /-- The actual inverse differential lift of any quotient field is |
| 55 | equivariant for the literal reflected deck involution. -/ |
| 56 | theorem twisted_cover_field_equivariant |
| 57 | (N : M27TwistedSphereLineFlowCertificate K) |
| 58 | (Z : (x : M) → TangentSpace (𝓡 3) x) (p : UnitTwoSphere × ℝ) : |
| 59 | let Y := mpullback Ip (𝓡 3) N.cover Z |
| 60 | mfderiv Ip Ip m27TwistedProductInvolution p (Y p) = |
| 61 | Y (m27TwistedProductInvolution p) := by |
| 62 | let Y := mpullback Ip (𝓡 3) N.cover Z |
| 63 | let tau := m27TwistedProductInvolution |
| 64 | have hi (q : UnitTwoSphere × ℝ) : (mfderiv Ip (𝓡 3) N.cover q).IsInvertible := |
| 65 | ⟨N.cover_local_diffeomorph.mfderivToContinuousLinearEquiv (by simp) q, rfl⟩ |
| 66 | have hd := congrArg (fun f : UnitTwoSphere × ℝ → M => |
| 67 | (mfderiv Ip (𝓡 3) f p (Y p) : V)) |
| 68 | (twisted_cover_comp_involution N) |
| 69 | have hcomp := mfderiv_comp_apply p |
| 70 | (N.cover_local_diffeomorph.contMDiff.mdifferentiable (by simp) (tau p)) |
| 71 | (N.involution_smooth.mdifferentiable (by simp) p) (Y p) |
| 72 | change @Eq V _ _ at hcomp |
| 73 | have hpoint := congrFun (twisted_cover_comp_involution N) p |
| 74 | change N.cover (tau p) = N.cover p at hpoint |
| 75 | have hz : (Z (N.cover (tau p)) : V) = Z (N.cover p) := |
| 76 | congrArg (fun x => (Z x : V)) hpoint |
| 77 | apply (hi (tau p)).injective |
| 78 | change @Eq V ((mfderiv Ip (𝓡 3) N.cover (tau p)) |
| 79 | (mfderiv Ip Ip tau p (Y p))) |
| 80 | ((mfderiv Ip (𝓡 3) N.cover (tau p)) (Y (tau p))) |
| 81 | exact (hcomp.symm.trans hd).trans |
| 82 | (((hi p).self_apply_inverse _).trans |
| 83 | (hz.symm.trans ((hi (tau p)).self_apply_inverse _).symm)) |
| 84 | |
| 85 | /-- In the actual reflected quotient, the lifted axial component is odd. |
| 86 | This is the orientation obstruction needed for a retained parallel field. -/ |
| 87 | theorem twisted_cover_field_axial_odd |
| 88 | (N : M27TwistedSphereLineFlowCertificate K) |
| 89 | (Z : (x : M) → TangentSpace (𝓡 3) x) (p : UnitTwoSphere × ℝ) : |
| 90 | (mpullback Ip (𝓡 3) N.cover Z (m27TwistedProductInvolution p)).2 = |
| 91 | -(mpullback Ip (𝓡 3) N.cover Z p).2 := by |
| 92 | have h := congrArg (fun v : TangentSpace Ip (m27TwistedProductInvolution p) => v.2) |
| 93 | (twisted_cover_field_equivariant N Z p) |
| 94 | rw [twistedProductInvolution_mfderiv_snd N.involution_smooth] at h |
| 95 | exact h.symm |
| 96 | |
| 97 | end PoincareMT.M35 |