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.Existence.Analysis.Basic.EvenSphereStrip |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Basic.GeneralizedCylinderDifferential |
| 3 | import PoincareLib.Geometry.RicciFlow.CanonicalNeighborhood.Ancient.Products |
| 4 | import Mathlib.Analysis.Normed.Module.Connected |
| 5 | |
| 6 | /-! |
| 7 | # Excluding the RP2 product in an ordinary Euclidean blow-up |
| 8 | |
| 9 | The actual product cover has an antipodal deck map that fixes the axial |
| 10 | coordinate. Its compact sphere strip lies in one convergence stage. |
| 11 | The stage embedding and a source-slice diffeomorphism give the forbidden |
| 12 | even immersion into R3. Only the actual spatial maps are used, including |
| 13 | at the final normalized time zero. |
| 14 | Source: Morgan-Tian Theorem 12.28, pp. 323-324; M34 RP2 product exclusion |
| 15 | derivation, sections 3-7. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open Set Metric |
| 21 | open scoped Manifold ContDiff Topology ENNReal |
| 22 | |
| 23 | universe u |
| 24 | |
| 25 | namespace PoincareMT.M34 |
| 26 | |
| 27 | section Cover |
| 28 | |
| 29 | variable {M : Type u} [TopologicalSpace M] |
| 30 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓡 3) ∞ M] |
| 31 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 32 | [SecondCountableTopology M] [ConnectedSpace M] |
| 33 | |
| 34 | /-- A neighborhood of the actual compact product-cover strip cannot |
| 35 | immerse in R3. The ordinary product deck map is essential here |
| 36 | (Theorem 12.28). -/ |
| 37 | theorem projectivePlaneLine_cover_not_immersed |
| 38 | {K : AncientKappaSolution 3 M} (P : M27ProjectivePlaneLineFlowCertificate K) |
| 39 | {U : Set M} (hU : IsOpen U) |
| 40 | (hcover : P.cover '' (univ ×ˢ Icc (-1 : ℝ) 1) ⊆ U) |
| 41 | (f : M → EuclideanSpace ℝ (Fin 3)) (hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f U) |
| 42 | (hinj : ∀ x ∈ U, Function.Injective (mfderiv (𝓡 3) (𝓡 3) f x)) : False := by |
| 43 | have hmaps : MapsTo P.cover (univ ×ˢ Ioo (-1 : ℝ) 1) U := by |
| 44 | intro p hp |
| 45 | exact hcover ⟨p, ⟨hp.1, hp.2.1.le, hp.2.2.le⟩, rfl⟩ |
| 46 | have hc := P.cover_local_diffeomorph.contMDiff |
| 47 | have hH : ContMDiffOn ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) ∞ (f ∘ P.cover) |
| 48 | (univ ×ˢ Ioo (-1 : ℝ) 1) := |
| 49 | hf.comp hc.contMDiffOn hmaps |
| 50 | have hHi (p : UnitTwoSphere × ℝ) (hp : p ∈ univ ×ˢ Ioo (-1 : ℝ) 1) : |
| 51 | Function.Injective |
| 52 | (mfderiv ((𝓡 2).prod 𝓘(ℝ, ℝ)) (𝓡 3) (f ∘ P.cover) p) := by |
| 53 | have hdf := ((hf (P.cover p) (hmaps hp)).contMDiffAt |
| 54 | (hU.mem_nhds (hmaps hp))).mdifferentiableAt (by simp) |
| 55 | rw [mfderiv_comp p hdf (hc.mdifferentiable (by simp) p)] |
| 56 | exact (hinj (P.cover p) (hmaps hp)).comp |
| 57 | ((P.cover_local_diffeomorph.mfderivToContinuousLinearEquiv (by simp) p).injective) |
| 58 | have heven (p : UnitTwoSphere × ℝ) (_hp : p ∈ univ ×ˢ Ioo (-1 : ℝ) 1) : |
| 59 | (f ∘ P.cover) (-p.1, p.2) = (f ∘ P.cover) p := by |
| 60 | exact congrArg f ((P.cover_fibers p (-p.1, p.2)).mpr (Or.inr rfl)).symm |
| 61 | have hrank : 1 < Module.rank ℝ (EuclideanSpace ℝ (Fin 3)) := by |
| 62 | rw [← Module.finrank_eq_rank, finrank_euclideanSpace_fin] |
| 63 | norm_num |
| 64 | have hdim : Odd (Module.finrank ℝ (EuclideanSpace ℝ (Fin 3))) := by |
| 65 | rw [finrank_euclideanSpace_fin] |
| 66 | decide |
| 67 | let : Fact (Module.finrank ℝ (EuclideanSpace ℝ (Fin 3)) = 2 + 1) := |
| 68 | ⟨finrank_euclideanSpace_fin⟩ |
| 69 | exact not_even_sphere_strip_immersion (n := 2) (f ∘ P.cover) (hH.of_le (by simp)) hHi heven |
| 70 | (isPreconnected_sphere hrank 0 1) hdim |
| 71 | ((EuclideanSpace.basisFun (Fin 3) ℝ).norm_eq_one 0) |
| 72 | |
| 73 | end Cover |
| 74 | |
| 75 | section Convergence |
| 76 | |
| 77 | variable {S : GeneralizedBlowupSequence.{u}} |
| 78 | (C : GeneralizedBlowupConvergence S (blowupBackwardInterval ⊤)) |
| 79 | |
| 80 | local instance : TopologicalSpace C.limit.carrier.carrier := C.limit.carrier.topologicalSpace |
| 81 | local instance : MeasurableSpace C.limit.carrier.carrier := C.limit.carrier.measurableSpace |
| 82 | local instance : BorelSpace C.limit.carrier.carrier := C.limit.carrier.borelSpace |
| 83 | local instance : ChartedSpace (EuclideanSpace ℝ (Fin 3)) C.limit.carrier.carrier := |
| 84 | C.limit.carrier.chartedSpace |
| 85 | local instance : IsManifold (𝓡 3) ∞ C.limit.carrier.carrier := C.limit.carrier.isManifold |
| 86 | local instance : T2Space C.limit.carrier.carrier := C.limit.carrier.t2Space |
| 87 | local instance : T3Space C.limit.carrier.carrier := C.limit.carrier.t3Space |
| 88 | local instance : SecondCountableTopology C.limit.carrier.carrier := |
| 89 | C.limit.carrier.secondCountable |
| 90 | local instance : ConnectedSpace C.limit.carrier.carrier := C.limit.connectedSpace |
| 91 | |
| 92 | /-- An actual generalized blow-up whose included source slices are |
| 93 | diffeomorphic to R3 cannot be the exceptional RP2-times-line solution |
| 94 | (Theorem 12.28). No metric convergence rate is needed for this exclusion. -/ |
| 95 | theorem generalizedBlowupConvergence_not_projectivePlaneLine |
| 96 | {kappa : ℝ} (A : BlowupAncientKappaIdentification C.limit kappa) |
| 97 | (hsource : ∀ k t, t ∈ (S.flow k).interval → |
| 98 | Nonempty (Diffeomorph (𝓡 3) (𝓡 3) |
| 99 | ((S.flow k).slice t).carrier (EuclideanSpace ℝ (Fin 3)) ∞)) : |
| 100 | ¬ Nonempty (M27ProjectivePlaneLineFlowCertificate A.solution) := by |
| 101 | rintro ⟨P⟩ |
| 102 | have hcompact : IsCompact (P.cover '' (univ ×ˢ Icc (-1 : ℝ) 1)) := |
| 103 | (isCompact_univ.prod isCompact_Icc).image P.cover_local_diffeomorph.contMDiff.continuous |
| 104 | obtain ⟨k, hk⟩ := hcompact.elim_directed_cover C.exhaustion.space |
| 105 | C.exhaustion.space_open |
| 106 | (fun x _ => C.exhaustion.space_covers.symm ▸ mem_univ x) |
| 107 | C.exhaustion.space_increasing.directed_le |
| 108 | have hzero : 0 ∈ Icc (-C.exhaustion.time k) 0 := |
| 109 | ⟨neg_nonpos.mpr (C.exhaustion.time_pos k).le, le_rfl⟩ |
| 110 | let e := C.embedding k |
| 111 | have ht : (S.base (C.subsequence k)).1 + 0 / S.scale (C.subsequence k) ∈ |
| 112 | (S.flow (C.subsequence k)).interval := |
| 113 | ((S.flow (C.subsequence k)).slice_nonempty_iff _).mp |
| 114 | ⟨e.forward 0 hzero C.limit.base⟩ |
| 115 | obtain ⟨psi⟩ := hsource (C.subsequence k) _ ht |
| 116 | let f := psi ∘ e.forward 0 hzero |
| 117 | have hf : ContMDiffOn (𝓡 3) (𝓡 3) ∞ f (C.exhaustion.space k) := |
| 118 | psi.contMDiff.comp_contMDiffOn (e.forward_smooth 0 hzero) |
| 119 | have hinj (x : C.limit.sliceCarrier.carrier) (hx : x ∈ C.exhaustion.space k) : |
| 120 | Function.Injective (mfderiv (𝓡 3) (𝓡 3) f x) := by |
| 121 | have he := ((e.forward_smooth 0 hzero x hx).contMDiffAt |
| 122 | ((C.exhaustion.space_open k).mem_nhds hx)).mdifferentiableAt (by simp) |
| 123 | change Function.Injective (mfderiv (𝓡 3) (𝓡 3) (psi ∘ e.forward 0 hzero) x) |
| 124 | rw [mfderiv_comp x (psi.mdifferentiable (by simp) _) he] |
| 125 | exact (psi.mfderivToContinuousLinearEquiv (by simp) _).injective.comp |
| 126 | (e.forward_mfderiv_injective (C.exhaustion.space_open k) hzero hx) |
| 127 | exact projectivePlaneLine_cover_not_immersed P (C.exhaustion.space_open k) hk f hf hinj |
| 128 | |
| 129 | end Convergence |
| 130 | |
| 131 | end PoincareMT.M34 |