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.Volume.LossData |
| 2 | |
| 3 | /-! |
| 4 | Adapted from Mapher `PoincareMT/Proofs/M49/Lemma17_12_EventHistory.lean` at |
| 5 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 6 | |
| 7 | # Event history for the volume-counting argument |
| 8 | |
| 9 | Morgan-Tian, Lemma 17.12, pp. 410-411, uses finite included prefixes and |
| 10 | counts disappearance of components. Here the raw interval and extinction |
| 11 | axioms give the predecessor intervals, finite compact event sets, and at |
| 12 | most one vanishing event. See `proof-work/tasks/M49/derivations/01-foundations.md`. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set Filter MeasureTheory |
| 18 | open scoped Topology ENNReal |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.SurgeryVolume |
| 23 | |
| 24 | variable (F : SurgeryFlowData.{u}) |
| 25 | |
| 26 | /-- The included initial segment used in Lemma 17.12, p. 410, lies in the raw domain. -/ |
| 27 | theorem initialInterval_subset {T : ℝ} (hT : T ∈ F.time_domain) : |
| 28 | Icc 0 T ⊆ F.time_domain := |
| 29 | F.time_domain_interval.out F.zero_mem hT |
| 30 | |
| 31 | /-- Surgery times in Lemma 17.12, p. 410, are strictly after the initial slice. -/ |
| 32 | theorem surgeryTime_pos {T : ℝ} (hT : T ∈ F.surgery_times) : 0 < T := by |
| 33 | have hnonneg : 0 ≤ T := F.time_domain_nonnegative (F.surgery_times_subset hT) |
| 34 | exact lt_of_le_of_ne hnonneg (fun h => F.zero_not_surgery (h.symm ▸ hT)) |
| 35 | |
| 36 | /-- Nonempty event predecessor intervals are included, as used in Lemma 17.12, p. 410. -/ |
| 37 | theorem nonemptyEventPreInterval : RepairedNonemptyEventPreInterval F := by |
| 38 | intro T hT hN t ht |
| 39 | exact initialInterval_subset F (F.surgery_times_subset hT) |
| 40 | ⟨(F.event T hT).tMinus_nonnegative.trans ht.1, ht.2.le⟩ |
| 41 | |
| 42 | /-- Vanishing event predecessor intervals are included, as used in Lemma 17.12, p. 410. -/ |
| 43 | theorem vanishingEventPreInterval : RepairedVanishingEventPreInterval F := by |
| 44 | intro T hT hE t ht |
| 45 | exact initialInterval_subset F (F.surgery_times_subset hT) |
| 46 | ⟨(F.vanishing_event T hT).tMinus_nonnegative.trans ht.1, ht.2.le⟩ |
| 47 | |
| 48 | /-- Local finiteness gives finite included compact prefixes in Lemma 17.12, p. 410. -/ |
| 49 | theorem surgeryTimes_inter_finite {K : Set ℝ} (hK : IsCompact K) |
| 50 | (hKD : K ⊆ F.time_domain) : (F.surgery_times ∩ K).Finite := by |
| 51 | apply hK.induction_on (p := fun U => (F.surgery_times ∩ U).Finite) |
| 52 | · simp |
| 53 | · intro U V hUV hV |
| 54 | exact hV.subset (inter_subset_inter_right _ hUV) |
| 55 | · intro U V hU hV |
| 56 | simpa only [inter_union_distrib_left] using hU.union hV |
| 57 | · intro t ht |
| 58 | obtain ⟨d, hd, hfinite⟩ := F.surgery_times_locally_finite t (hKD ht) |
| 59 | refine ⟨Ioo (t - d) (t + d), mem_nhdsWithin_of_mem_nhds ?_, hfinite⟩ |
| 60 | exact Ioo_mem_nhds (by linarith) (by linarith) |
| 61 | |
| 62 | /-- Both included endpoints suffice for the finite-prefix use of Lemma 17.12, p. 410. -/ |
| 63 | theorem surgeryTimes_inter_Icc_finite {a b : ℝ} |
| 64 | (ha : a ∈ F.time_domain) (hb : b ∈ F.time_domain) : |
| 65 | (F.surgery_times ∩ Icc a b).Finite := |
| 66 | surgeryTimes_inter_finite F isCompact_Icc (F.time_domain_interval.out ha hb) |
| 67 | |
| 68 | /-- All earlier included slices are nonempty before a vanishing event |
| 69 | (MT Lemma 17.12, pp. 410-411). -/ |
| 70 | theorem nonempty_before_vanishing {T : ℝ} (hT : T ∈ F.surgery_times) |
| 71 | [IsEmpty (F.slice T).carrier] {s : ℝ} (hs : s ∈ F.time_domain) (hsT : s < T) : |
| 72 | Nonempty (F.slice s).carrier := by |
| 73 | classical |
| 74 | by_contra hN |
| 75 | let : IsEmpty (F.slice s).carrier := not_nonempty_iff.mp hN |
| 76 | let E := F.vanishing_event T hT |
| 77 | let t := max s E.tMinus |
| 78 | have ht : t ∈ Ico E.tMinus T := ⟨le_max_right _ _, max_lt hsT E.tMinus_lt⟩ |
| 79 | have htD : t ∈ F.time_domain := vanishingEventPreInterval F T hT ht |
| 80 | let : IsEmpty (F.slice t).carrier := |
| 81 | F.extinction_permanent s t hs htD (le_max_left _ _) inferInstance |
| 82 | obtain ⟨x⟩ := E.pre_nonempty |
| 83 | exact isEmptyElim (E.pre_identify ⟨t, ht⟩ x) |
| 84 | |
| 85 | /-- At most one surgery has an empty post-slice, as needed for MT Lemma 17.12, p. 411. -/ |
| 86 | theorem vanishingTimes_subsingleton : |
| 87 | {T ∈ F.surgery_times | IsEmpty (F.slice T).carrier}.Subsingleton := by |
| 88 | intro s hs t ht |
| 89 | rcases lt_trichotomy s t with hst | hst | hts |
| 90 | · let := hs.2 |
| 91 | let := ht.2 |
| 92 | obtain ⟨x⟩ := nonempty_before_vanishing F ht.1 (F.surgery_times_subset hs.1) hst |
| 93 | exact isEmptyElim x |
| 94 | · exact hst |
| 95 | · let := hs.2 |
| 96 | let := ht.2 |
| 97 | obtain ⟨x⟩ := nonempty_before_vanishing F hs.1 (F.surgery_times_subset ht.1) hts |
| 98 | exact isEmptyElim x |
| 99 | |
| 100 | /-- Empty post-slices give the vanishing-volume clause of Lemma 17.12, pp. 410-411. -/ |
| 101 | theorem vanishingVolumeData (T : ℝ) (hT : T ∈ F.surgery_times) |
| 102 | [IsEmpty (F.slice T).carrier] : RepairedVanishingVolumeData F T hT where |
| 103 | post_volume_zero := by rw [Set.univ_eq_empty_iff.mpr inferInstance, measure_empty] |
| 104 | volume_drop := by |
| 105 | rw [Set.univ_eq_empty_iff.mpr inferInstance, measure_empty] |
| 106 | exact bot_le |
| 107 | |
| 108 | end PoincareMT.SurgeryVolume |