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.Ancestry.Path |
| 2 | |
| 3 | /-! |
| 4 | # Literal ancestry paths covering a target slice |
| 5 | |
| 6 | Reselect one terminal point in each component of the finite M56 cover, then |
| 7 | use the corresponding `path_for`. This keeps M57 on the literal selected |
| 8 | path without any re-basing or additional geometric assertion. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT |
| 18 | |
| 19 | theorem m56LiteralPathCover |
| 20 | {F : SurgeryFlowData.{u}} {W : RepairedEventChildWitness F} |
| 21 | (ancestry : RepairedFiniteAncestryData F W) |
| 22 | (T : ℝ) (hT : T ∈ F.time_domain) : |
| 23 | ∃ n : ℕ, ∃ points : Fin n → (F.slice T).carrier, |
| 24 | ∀ x : (F.slice T).carrier, ∃ i : Fin n, |
| 25 | x ∈ Set.range ((ancestry.path_for T hT (points i)).component |
| 26 | ⟨T, F.time_domain_nonnegative hT, le_rfl⟩).inclusion := by |
| 27 | obtain ⟨n, paths, hcover⟩ := ancestry.finite_path_cover T hT |
| 28 | let terminal : Set.Icc (0 : ℝ) T := |
| 29 | ⟨T, F.time_domain_nonnegative hT, le_rfl⟩ |
| 30 | let points : Fin n → (F.slice T).carrier := fun i => |
| 31 | ((paths i).component terminal).inclusion |
| 32 | ((paths i).component terminal).basepoint |
| 33 | refine ⟨n, points, ?_⟩ |
| 34 | intro x |
| 35 | obtain ⟨i, hi⟩ := hcover x |
| 36 | refine ⟨i, ?_⟩ |
| 37 | let selected := (ancestry.path_for T hT (points i)).component terminal |
| 38 | have hpoint : points i ∈ connectedComponent |
| 39 | (selected.inclusion selected.basepoint) := by |
| 40 | rw [← selected.range_eq_component] |
| 41 | exact ancestry.path_for_terminal_cover T hT (points i) |
| 42 | have hrange : Set.range ((paths i).component terminal).inclusion = |
| 43 | Set.range selected.inclusion := by |
| 44 | rw [((paths i).component terminal).range_eq_component, |
| 45 | selected.range_eq_component] |
| 46 | exact (connectedComponent_eq hpoint).symm |
| 47 | exact hrange ▸ hi |
| 48 | |
| 49 | /- |
| 50 | Natural-language algebraic adapter: every subsingleton group is a finite free |
| 51 | product of finite or infinite-cyclic factors, using the empty factor family. |
| 52 | The empty coproduct is shown trivial by its actual induction principle; no |
| 53 | topological or endpoint statement is hidden in this conversion. |
| 54 | |
| 55 | This is the group-theoretic interface used when M02 supplies triviality of |
| 56 | the based fundamental group at the exact initial component. |
| 57 | -/ |
| 58 | set_option linter.style.haveILetI false in |
| 59 | theorem finiteFreeProductCyclic_of_subsingleton |
| 60 | {G : Type u} [Group G] (hG : Subsingleton G) : |
| 61 | IsFiniteFreeProductCyclic G := by |
| 62 | let F : FiniteOrCyclicFactors 0 := |
| 63 | { carrier := fun _ => G |
| 64 | group := fun i => Fin.elim0 i |
| 65 | kind := fun i => Fin.elim0 i } |
| 66 | letI : ∀ i, Group (F.carrier i) := F.group |
| 67 | let H := Monoid.CoprodI F.carrier |
| 68 | have hH : Subsingleton H := by |
| 69 | constructor |
| 70 | intro a b |
| 71 | have ha : a = 1 := by |
| 72 | induction a using Monoid.CoprodI.induction_on with |
| 73 | | one => rfl |
| 74 | | of i x => exact Fin.elim0 i |
| 75 | | mul x y hx hy => rw [hx, hy, one_mul] |
| 76 | have hb : b = 1 := by |
| 77 | induction b using Monoid.CoprodI.induction_on with |
| 78 | | one => rfl |
| 79 | | of i x => exact Fin.elim0 i |
| 80 | | mul x y hx hy => rw [hx, hy, one_mul] |
| 81 | exact ha.trans hb.symm |
| 82 | let hom : G →* H := |
| 83 | { toFun := fun _ => 1 |
| 84 | map_one' := rfl |
| 85 | map_mul' := by intros; simp } |
| 86 | have hbijective : Function.Bijective hom := by |
| 87 | constructor |
| 88 | · intro a b _ |
| 89 | exact hG.elim a b |
| 90 | · intro y |
| 91 | have hy : y = 1 := hH.elim y 1 |
| 92 | exact ⟨1, hy.symm⟩ |
| 93 | refine ⟨0, F, ?_⟩ |
| 94 | exact ⟨MulEquiv.ofBijective hom hbijective⟩ |
| 95 | |
| 96 | /- The simply-connected specialization uses Mathlib's based fundamental-group |
| 97 | subsingleton instance at each point, then applies the checked algebraic |
| 98 | adapter above. -/ |
| 99 | theorem finiteFreeProductCyclic_of_simplyConnected |
| 100 | {M : Type u} [TopologicalSpace M] [SimplyConnectedSpace M] : |
| 101 | ∀ x : M, IsFiniteFreeProductCyclic (FundamentalGroup M x) := by |
| 102 | intro x |
| 103 | exact finiteFreeProductCyclic_of_subsingleton |
| 104 | (inferInstance : Subsingleton (FundamentalGroup M x)) |
| 105 | |
| 106 | end PoincareMT |