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.Finite.TraceComponents |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Ancestry.Finite.SurvivorSelection |
| 3 | import PoincareLib.Topology.Manifold.Surgery.GroupEffects.FactorData |
| 4 | |
| 5 | /-! |
| 6 | # Assembling the full component-path certificate |
| 7 | |
| 8 | The geometric trace gives exact regular maps and retained overlap. The |
| 9 | all-point group invariant gives the bounded M54 persistence input on these |
| 10 | same selected components. Source: MT Definition 18.2, pp. 419--420, and |
| 11 | Proposition 15.3, pp. 357--358. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT |
| 22 | |
| 23 | /-- Assemble every frozen path field on a coherent geometric trace |
| 24 | (MT Definition 18.2, pp. 419--420). -/ |
| 25 | noncomputable def m56TracePath (G54 : RepairedGroupEffectsTheory.{u}) |
| 26 | {F : SurgeryFlowData.{u}} (W : RepairedEventChildWitness F) |
| 27 | {T : ℝ} (P : M56ComponentTrace F T) (hT : T ∈ F.time_domain) |
| 28 | (C0 : SurgerySelectedComponent (F.slice 0)) (hC0 : range C0.inclusion = univ) |
| 29 | (hconn : IsConnected (univ : Set (F.slice 0).carrier)) |
| 30 | (hgroups : ∀ t ∈ F.time_domain, M56PointGroups (F.slice t)) : |
| 31 | RepairedComponentPath F T W := by |
| 32 | classical |
| 33 | let C := m56TraceComponents P C0 |
| 34 | have hC := m56TraceComponents_range P C0 hC0 hconn |
| 35 | choose regular hregular using m56Trace_regularDiffeomorph P C hC |
| 36 | let index := fun s hs hpost => |
| 37 | m56SurvivorSelection (W.topology s.1 hs hpost) (P.point s) |
| 38 | have groups (s : Icc (0 : ℝ) T) : Subsingleton (selectedFundamentalGroup (C s)) := |
| 39 | m56SelectedComponent_pointGroups (C s) (hgroups s.1 (P.time_subset s.2)) (C s).basepoint |
| 40 | have finite : (F.surgery_times ∩ Icc 0 T).Finite := |
| 41 | F.surgery_times_finite_on_compact isCompact_Icc P.time_subset |
| 42 | let input : RepairedGroupPersistenceInput F T C := { |
| 43 | terminal_mem := hT |
| 44 | time_nonnegative := F.time_domain_nonnegative hT |
| 45 | time_subset := P.time_subset |
| 46 | surgery_times := finite.toFinset |
| 47 | surgery_times_eq := finite.coe_toFinset |
| 48 | initial_group := groups ⟨0, le_rfl, F.time_domain_nonnegative hT⟩ |
| 49 | regular_group_equivalence := fun a b _ _ => by |
| 50 | let : Unique (selectedFundamentalGroup (C a)) := @uniqueOfSubsingleton _ (groups a) 1 |
| 51 | let : Unique (selectedFundamentalGroup (C b)) := @uniqueOfSubsingleton _ (groups b) 1 |
| 52 | exact ⟨MulEquiv.ofUnique⟩ |
| 53 | event_factor := fun s _ _ => by |
| 54 | let : Subsingleton (selectedFundamentalGroup (C s)) := groups s |
| 55 | exact ⟨RepairedGroupFactorData.ofRetraction 1 1 (by |
| 56 | ext x |
| 57 | exact Subsingleton.elim _ _)⟩ } |
| 58 | refine { |
| 59 | terminal_mem := hT |
| 60 | component := C |
| 61 | time_subset := P.time_subset |
| 62 | surgery_times := finite.toFinset |
| 63 | surgery_times_eq := finite.coe_toFinset |
| 64 | regular_transport := regular |
| 65 | regular_transport_ambient := hregular |
| 66 | event_survivor_index := fun s hs hpost => (index s hs hpost).1 |
| 67 | event_survivor_index_kind := fun s hs hpost => (index s hs hpost).2.1 |
| 68 | event_survivor := ?_ |
| 69 | event_time_mem := ?_ |
| 70 | survivor_piece_equivalence := ?_ |
| 71 | surgery_transition_inherited := ?_ |
| 72 | group_persistence_input := input |
| 73 | group_persistence := G54.persistence F T C input } |
| 74 | · intro s hs hpost |
| 75 | exact ⟨(hC s).trans (index s hs hpost).2.2.symm, |
| 76 | (W.children s.1 hs hpost).survivor_component_point_spec _ _⟩ |
| 77 | · intro s hs hpost |
| 78 | let := hpost |
| 79 | exact P.time_subset ⟨(F.event s.1 hs).tMinus_nonnegative, |
| 80 | (F.event s.1 hs).tMinus_lt.le.trans s.2.2⟩ |
| 81 | · intro s hs hpost |
| 82 | exact m56RegionComponentDiffeomorph_exists |
| 83 | ((W.topology s.1 hs hpost).survivor (index s hs hpost).1 (index s hs hpost).2.1) |
| 84 | (C s) ((hC s).trans (index s hs hpost).2.2.symm) |
| 85 | · intro s hs hpost |
| 86 | let := hpost |
| 87 | obtain ⟨x, hx, hxi, hxr⟩ := P.inherited s hs hpost |
| 88 | let a : Icc (0 : ℝ) T := ⟨(F.event s.1 hs).tMinus, |
| 89 | (F.event s.1 hs).tMinus_nonnegative, (F.event s.1 hs).tMinus_lt.le.trans s.2.2⟩ |
| 90 | have hxC : x ∈ range (C a).inclusion := (hC a).symm ▸ hx |
| 91 | obtain ⟨z, rfl⟩ := hxC |
| 92 | exact ⟨z, hxi, (hC s).symm ▸ hxr⟩ |
| 93 | |
| 94 | end PoincareMT |