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.Extinction.Width.Class.IdentificationTheory |
| 2 | |
| 3 | set_option autoImplicit false |
| 4 | |
| 5 | open scoped Manifold ContDiff Bundle Topology ENNReal unitInterval |
| 6 | |
| 7 | universe u |
| 8 | |
| 9 | namespace PoincareMT |
| 10 | |
| 11 | variable {M : Type u} [TopologicalSpace M] |
| 12 | [ChartedSpace LoopAmbient M] [IsManifold (𝓡 3) ∞ M] |
| 13 | |
| 14 | /-! A normalized constant family for the fixed M59 sphere parameter. -/ |
| 15 | noncomputable def m59ConstantFamily |
| 16 | (q : M59SphereQuotient) (x : M) : FreeTwoSphereFamily (M := M) := by |
| 17 | let F : ContinuousMap LoopTwoSphere (C1FreeLoopSpace (M := M)) := |
| 18 | constantLoopFamily x |
| 19 | let R : ContinuousMap (Fin 2 → I) (C1FreeLoopSpace (M := M)) := |
| 20 | ContinuousMap.const _ (constantC1Loop x) |
| 21 | let E : LoopTwoSphere × LoopPlane → M := fun _ => x |
| 22 | refine { |
| 23 | basepoint := x |
| 24 | family := F |
| 25 | homotopy_class := 1 |
| 26 | class_certificate := { |
| 27 | cube_representative := R |
| 28 | boundary_const := by intro y hy; rfl |
| 29 | sphere_parameter := q.map |
| 30 | sphere_parameter_surjective := q.surjective |
| 31 | sphere_parameter_boundary_collapsed := ⟨q.pole, q.boundary_collapsed⟩ |
| 32 | sphere_parameter_quotient_fiber := q.exact_fibers |
| 33 | family_agreement := by intro y; rfl |
| 34 | class_eq := by |
| 35 | rfl } |
| 36 | continuous := F.continuous |
| 37 | derivative_continuous := by |
| 38 | intro i |
| 39 | change Continuous (fun p : LoopTwoSphere × LoopCircle => |
| 40 | c1LoopDerivative (constantC1Loop x) p.2 i) |
| 41 | convert (continuous_const : Continuous (fun _ : LoopTwoSphere × LoopCircle => |
| 42 | (⟨x, 0⟩ : TangentBundle (𝓡 3) M))) using 1 |
| 43 | funext p |
| 44 | simp only [c1LoopDerivative] |
| 45 | congr 1 |
| 46 | rw [show c1LoopExtension (constantC1Loop x) = (fun _ : LoopPlane => x) by rfl] |
| 47 | rw [mfderiv_const] |
| 48 | rfl |
| 49 | null_homotopic := by |
| 50 | intro c |
| 51 | refine ⟨fun _ => x, continuous_const, ?_⟩ |
| 52 | intro z |
| 53 | rfl |
| 54 | joint_extension := by |
| 55 | refine ⟨E, ?_, ?_, ?_⟩ |
| 56 | · exact continuous_const.continuousOn |
| 57 | · intro c z |
| 58 | rfl |
| 59 | · intro c |
| 60 | simpa using (contMDiff_const.contMDiffOn : |
| 61 | ContMDiffOn (𝓡 2) (𝓡 3) 1 (fun _ : LoopPlane => x) loopAnnulus) } |
| 62 | |
| 63 | theorem m59ConstantFamily_normalized |
| 64 | (q : M59SphereQuotient) (x : M) : |
| 65 | M59NormalizedAt q x (m59ConstantFamily q x) := by |
| 66 | refine ⟨rfl, ?_⟩ |
| 67 | rfl |
| 68 | |
| 69 | theorem m59ConstantFamily_class |
| 70 | (q : M59SphereQuotient) (x : M) : |
| 71 | familySigmaClass (m59ConstantFamily q x) = |
| 72 | ⟨x, (1 : HomotopyGroup.Pi 2 |
| 73 | (C1FreeLoopSpace (M := M)) (constantC1Loop x))⟩ := by |
| 74 | rfl |
| 75 | |
| 76 | theorem m67_raw_nontrivial_of_normalized_family |
| 77 | (S : M59IdentificationSystem.{u}) |
| 78 | [T2Space M] [SecondCountableTopology M] |
| 79 | (compact : IsCompact (Set.univ : Set M)) |
| 80 | (connected : IsConnected (Set.univ : Set M)) |
| 81 | (x : M) |
| 82 | (pi_two : Subsingleton (HomotopyGroup.Pi 2 M x)) |
| 83 | (alpha : HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := M)) |
| 84 | (constantC1Loop x)) |
| 85 | (Gamma : FreeTwoSphereFamily (M := M)) |
| 86 | (hnormalized : M59NormalizedAt S.quotient x Gamma) |
| 87 | (hclass : familySigmaClass Gamma = ⟨x, alpha⟩) |
| 88 | (halpha : alpha ≠ 1) : |
| 89 | ¬ (m59FamilyMap Gamma).Homotopic (constantLoopFamily x) := by |
| 90 | intro hconst |
| 91 | let C := S.core compact connected x pi_two |
| 92 | have hzero := m59ConstantFamily_normalized S.quotient x |
| 93 | have hzero_class := m59ConstantFamily_class S.quotient x |
| 94 | have hhom : (m59FamilyMap Gamma).Homotopic |
| 95 | (m59FamilyMap (m59ConstantFamily S.quotient x)) := by |
| 96 | exact hconst.trans (ContinuousMap.Homotopic.refl (constantLoopFamily x)) |
| 97 | have hsigma : familySigmaClass Gamma = |
| 98 | familySigmaClass (m59ConstantFamily S.quotient x) := |
| 99 | (C.free_class_identification Gamma (m59ConstantFamily S.quotient x) |
| 100 | hnormalized hzero).mp hhom |
| 101 | have hpair : (⟨x, alpha⟩ : Sigma (fun z : M => |
| 102 | HomotopyGroup.Pi 2 (C1FreeLoopSpace (M := M)) (constantC1Loop z))) = |
| 103 | ⟨x, (1 : HomotopyGroup.Pi 2 |
| 104 | (C1FreeLoopSpace (M := M)) (constantC1Loop x))⟩ := by |
| 105 | exact hclass.symm.trans (hsigma.trans hzero_class) |
| 106 | apply halpha |
| 107 | exact eq_of_heq (Sigma.mk.inj hpair).2 |
| 108 | |
| 109 | end PoincareMT |