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.CanonicalInduction.Positive.PositiveHistoryBirth |
| 2 | |
| 3 | /-! |
| 4 | # The actual component birth and its zero-age alternative |
| 5 | |
| 6 | The finite backward search starts on the actual compact terminal |
| 7 | component and runs to physical time zero. A singleton birth is an |
| 8 | actual cap-contact event at the tested time, without any asserted age. |
| 9 | Source: Uniform Seed, MT pp. 393-394; old-history assembly, Stage F. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.Proofs.M47 |
| 21 | |
| 22 | /-- An actual terminal point supplies its compact connected open |
| 23 | component and a based cylinder beginning at zero or an actual cap. -/ |
| 24 | theorem exists_seed_component_birth |
| 25 | (F : SurgeryFlowData.{u}) {T : ℝ} (hT : T ∈ F.time_domain) |
| 26 | (x : (F.slice T).carrier) : |
| 27 | ∃ U : TopologicalSpace.Opens (F.slice T).carrier, |
| 28 | (U : Set (F.slice T).carrier) = connectedComponent x ∧ |
| 29 | IsCompact (U : Set (F.slice T).carrier) ∧ |
| 30 | IsConnected (U : Set (F.slice T).carrier) ∧ x ∈ U ∧ |
| 31 | ∃ (b : ℝ) (hb : b ∈ Icc (-T) 0), |
| 32 | ∃ e : SurgeryFlowCylinder F (F.slice T) T 1 (Icc b 0) U, |
| 33 | (∀ hs y, y ∈ U → HEq (e.forward 0 hs y) y) ∧ |
| 34 | (T + b / 1 = 0 ∨ ∃ hbirth : T + b / 1 ∈ F.surgery_times, |
| 35 | ∀ [Nonempty (F.slice (T + b / 1)).carrier], |
| 36 | ∃ i : Fin (F.event (T + b / 1) hbirth).cap_count, |
| 37 | (e.forward b ⟨le_rfl, hb.2⟩ '' |
| 38 | (U : Set (F.slice T).carrier) ∩ |
| 39 | ((F.event (T + b / 1) hbirth).caps i).carrier).Nonempty) := by |
| 40 | let : CompactSpace (F.slice T).carrier := isCompact_univ_iff.mp (F.slices_compact T hT) |
| 41 | let : LocallyConnectedSpace (F.slice T).carrier := |
| 42 | ChartedSpace.locallyConnectedSpace (EuclideanSpace ℝ (Fin 3)) _ |
| 43 | let U : TopologicalSpace.Opens (F.slice T).carrier := |
| 44 | ⟨connectedComponent x, isOpen_connectedComponent⟩ |
| 45 | have hcompact : IsCompact (U : Set (F.slice T).carrier) := isClosed_connectedComponent.isCompact |
| 46 | have hconnected : IsConnected (U : Set (F.slice T).carrier) := isConnected_connectedComponent |
| 47 | have hnonnegative : 0 ≤ T := F.time_domain_nonnegative hT |
| 48 | have htime : Icc (T + -T) T ⊆ F.time_domain := by |
| 49 | simpa only [add_neg_cancel] using F.time_domain_interval.out F.zero_mem hT |
| 50 | obtain ⟨b, hb, e, hbased, hstop⟩ := M47Positive.exists_component_birth_cylinder F |
| 51 | (neg_nonpos.mpr hnonnegative) htime U U.isOpen hcompact hconnected |
| 52 | refine ⟨U, rfl, hcompact, hconnected, mem_connectedComponent, b, hb, e, hbased, ?_⟩ |
| 53 | rcases hstop with hzero | hcap |
| 54 | · exact Or.inl (by simp only [hzero, div_one, add_neg_cancel]) |
| 55 | · exact Or.inr hcap |
| 56 | |
| 57 | /-- A singleton actual component birth at a positive terminal time |
| 58 | is a cap-contact event at that very time. The based map identifies the |
| 59 | whole terminal source, without any post-terminal extension. -/ |
| 60 | theorem seed_singleton_component_birth_meets_cap |
| 61 | {F : SurgeryFlowData.{u}} {T : ℝ} (hT : 0 < T) |
| 62 | (U : TopologicalSpace.Opens (F.slice T).carrier) |
| 63 | (e : SurgeryFlowCylinder F (F.slice T) T 1 (Icc 0 0) U) |
| 64 | (based : ∀ hs y, y ∈ U → HEq (e.forward 0 hs y) y) |
| 65 | (hbirth : T + 0 / 1 = 0 ∨ ∃ hbirth : T + 0 / 1 ∈ F.surgery_times, |
| 66 | ∀ [Nonempty (F.slice (T + 0 / 1)).carrier], |
| 67 | ∃ i : Fin (F.event (T + 0 / 1) hbirth).cap_count, |
| 68 | (e.forward 0 ⟨le_rfl, le_rfl⟩ '' (U : Set (F.slice T).carrier) ∩ |
| 69 | ((F.event (T + 0 / 1) hbirth).caps i).carrier).Nonempty) : |
| 70 | ∃ hbirth : T ∈ F.surgery_times, |
| 71 | ∀ [Nonempty (F.slice T).carrier], |
| 72 | ∃ i : Fin (F.event T hbirth).cap_count, |
| 73 | ((U : Set (F.slice T).carrier) ∩ ((F.event T hbirth).caps i).carrier).Nonempty := by |
| 74 | have hnotzero : T + 0 / 1 ≠ 0 := by simpa only [zero_div, add_zero] using hT.ne' |
| 75 | have hcap := hbirth.resolve_left hnotzero |
| 76 | have transfer (s : ℝ) (hs : s = T) |
| 77 | (f : (F.slice T).carrier → (F.slice s).carrier) |
| 78 | (hf : ∀ y ∈ U, HEq (f y) y) |
| 79 | (hc : ∃ h : s ∈ F.surgery_times, |
| 80 | ∀ [Nonempty (F.slice s).carrier], ∃ i : Fin (F.event s h).cap_count, |
| 81 | (f '' (U : Set (F.slice T).carrier) ∩ ((F.event s h).caps i).carrier).Nonempty) : |
| 82 | ∃ h : T ∈ F.surgery_times, |
| 83 | ∀ [Nonempty (F.slice T).carrier], ∃ i : Fin (F.event T h).cap_count, |
| 84 | ((U : Set (F.slice T).carrier) ∩ ((F.event T h).caps i).carrier).Nonempty := by |
| 85 | subst s |
| 86 | obtain ⟨h, hc⟩ := hc |
| 87 | refine ⟨h, ?_⟩ |
| 88 | intro hn |
| 89 | obtain ⟨i, z, ⟨y, hy, hzy⟩, hzcap⟩ := hc |
| 90 | refine ⟨i, y, hy, ?_⟩ |
| 91 | have hyz : y = z := (eq_of_heq (hf y hy)).symm.trans hzy |
| 92 | exact hyz.symm ▸ hzcap |
| 93 | exact transfer _ (by simp only [zero_div, add_zero]) |
| 94 | (e.forward 0 ⟨le_rfl, le_rfl⟩) (based _) hcap |
| 95 | |
| 96 | end PoincareMT.Proofs.M47 |