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.Continuation.RegularHistory |
| 2 | |
| 3 | /-! |
| 4 | # Construction data for finite regular-history windows |
| 5 | |
| 6 | The regular part of a surgery flow is observed on a connected interval inside |
| 7 | the actual time domain. Local finiteness of surgery times gives the finite |
| 8 | event ledger needed by the generalized-flow construction, while permanence of |
| 9 | empty slices gives nonemptiness on every preterminal window. |
| 10 | |
| 11 | These are the source-faithful preparatory lemmas for Morgan--Tian, |
| 12 | Lemma 14.11 and Proposition 14.12 (pp. 349-350). They do not assert the |
| 13 | generalized-flow realization itself. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | theorem SurgeryFlowData.surgery_times_finite_on_compact |
| 25 | (F : SurgeryFlowData.{u}) {K : Set ℝ} (hK : IsCompact K) |
| 26 | (hKF : K ⊆ F.time_domain) : (F.surgery_times ∩ K).Finite := by |
| 27 | classical |
| 28 | choose d hd hfinite using |
| 29 | (fun t : K => F.surgery_times_locally_finite t.1 (hKF t.2)) |
| 30 | let U (t : K) : Set ℝ := Set.Ioo (t.1 - d t) (t.1 + d t) |
| 31 | obtain ⟨cover, hcover⟩ := hK.elim_finite_subcover U |
| 32 | (fun _ => isOpen_Ioo) (by |
| 33 | intro t ht |
| 34 | exact Set.mem_iUnion.mpr ⟨⟨t, ht⟩, by |
| 35 | change t - d ⟨t, ht⟩ < t ∧ t < t + d ⟨t, ht⟩ |
| 36 | constructor <;> linarith [hd ⟨t, ht⟩]⟩) |
| 37 | apply (cover.finite_toSet.biUnion (fun t _ => hfinite t)).subset |
| 38 | intro t ht |
| 39 | obtain ⟨s, hs, htU⟩ := Set.mem_iUnion₂.mp (hcover ht.2) |
| 40 | exact Set.mem_iUnion₂.mpr ⟨s, hs, ht.1, htU⟩ |
| 41 | |
| 42 | theorem RepairedPreterminalSlab.initial_interval_subset |
| 43 | {F : SurgeryFlowData.{u}} {T : ℝ} (P : RepairedPreterminalSlab F T) : |
| 44 | Set.Ico 0 T ⊆ F.time_domain := by |
| 45 | intro t ht |
| 46 | by_cases h : t ≤ P.start |
| 47 | · exact F.time_domain_interval.out F.zero_mem P.start_mem ⟨ht.1, h⟩ |
| 48 | · exact P.time_subset ⟨(lt_of_not_ge h).le, ht.2⟩ |
| 49 | |
| 50 | theorem RepairedPreterminalSlab.initial_slices_nonempty |
| 51 | {F : SurgeryFlowData.{u}} {T : ℝ} (P : RepairedPreterminalSlab F T) : |
| 52 | ∀ t ∈ Set.Ico 0 T, Nonempty (F.slice t).carrier := by |
| 53 | obtain ⟨s, _, x, _⟩ := P.curvature_unbounded 0 P.start P.start_lt |
| 54 | intro t ht |
| 55 | by_cases h : P.start ≤ t |
| 56 | · exact ⟨P.identify ⟨t, h, ht.2⟩ x⟩ |
| 57 | · by_contra hne |
| 58 | exact (F.extinction_permanent t P.start (P.initial_interval_subset ht) |
| 59 | P.start_mem (lt_of_not_ge h).le ⟨fun y => hne ⟨y⟩⟩).false x |
| 60 | |
| 61 | theorem RepairedPreterminalSlab.initial_events_finite |
| 62 | {F : SurgeryFlowData.{u}} {T : ℝ} (P : RepairedPreterminalSlab F T) : |
| 63 | (F.surgery_times ∩ Set.Ico 0 T).Finite := by |
| 64 | have hprefix : Set.Icc 0 P.start ⊆ F.time_domain := |
| 65 | F.time_domain_interval.out F.zero_mem P.start_mem |
| 66 | apply (F.surgery_times_finite_on_compact isCompact_Icc hprefix).subset |
| 67 | intro t ht |
| 68 | refine ⟨ht.1, ht.2.1, ?_⟩ |
| 69 | by_contra h |
| 70 | exact Set.disjoint_left.mp P.surgery_free ht.1 ⟨lt_of_not_ge h, ht.2.2⟩ |
| 71 | |
| 72 | /-- The complete old history up to an excluded singular frontier. -/ |
| 73 | def RepairedPreterminalSlab.regularHistoryWindow |
| 74 | {F : SurgeryFlowData.{u}} {T : ℝ} (P : RepairedPreterminalSlab F T) : |
| 75 | M33RegularHistoryWindow F where |
| 76 | interval := Set.Ico 0 T |
| 77 | interval_connected := Set.ordConnected_Ico |
| 78 | interval_nontrivial := by |
| 79 | have hT : 0 < T := lt_of_le_of_lt |
| 80 | (F.time_domain_nonnegative P.start_mem) P.start_lt |
| 81 | refine ⟨0, ⟨le_rfl, hT⟩, T / 2, ⟨by linarith, by linarith⟩, ?_⟩ |
| 82 | linarith |
| 83 | zero_mem := ⟨le_rfl, lt_of_le_of_lt |
| 84 | (F.time_domain_nonnegative P.start_mem) P.start_lt⟩ |
| 85 | time_subset := P.initial_interval_subset |
| 86 | slice_nonempty := P.initial_slices_nonempty |
| 87 | events_finite := P.initial_events_finite |
| 88 | |
| 89 | /-- A nonempty included slice rules out extinction on its closed history. -/ |
| 90 | def SurgeryFlowData.closedRegularHistoryWindow (F : SurgeryFlowData.{u}) |
| 91 | (H : ℝ) (hH : 0 < H) (hHmem : H ∈ F.time_domain) |
| 92 | (hne : Nonempty (F.slice H).carrier) : M33RegularHistoryWindow F where |
| 93 | interval := Set.Icc 0 H |
| 94 | interval_connected := Set.ordConnected_Icc |
| 95 | interval_nontrivial := ⟨0, ⟨le_rfl, hH.le⟩, H, ⟨hH.le, le_rfl⟩, hH.ne⟩ |
| 96 | zero_mem := ⟨le_rfl, hH.le⟩ |
| 97 | time_subset := F.time_domain_interval.out F.zero_mem hHmem |
| 98 | slice_nonempty := by |
| 99 | intro t ht |
| 100 | by_contra hempty |
| 101 | obtain ⟨x⟩ := hne |
| 102 | exact (F.extinction_permanent t H |
| 103 | (F.time_domain_interval.out F.zero_mem hHmem ht) hHmem ht.2 |
| 104 | ⟨fun y => hempty ⟨y⟩⟩).false x |
| 105 | events_finite := F.surgery_times_finite_on_compact isCompact_Icc |
| 106 | (F.time_domain_interval.out F.zero_mem hHmem) |
| 107 | |
| 108 | theorem m33RegularRegion_of_regular (F : SurgeryFlowData.{u}) (t : ℝ) |
| 109 | (ht : t ∉ F.surgery_times) : m33RegularRegion F t = Set.univ := by |
| 110 | ext x |
| 111 | simp [m33RegularRegion, ht] |
| 112 | |
| 113 | theorem m33RegularRegion_of_surgery (F : SurgeryFlowData.{u}) (t : ℝ) |
| 114 | (ht : t ∈ F.surgery_times) [Nonempty (F.slice t).carrier] : |
| 115 | m33RegularRegion F t = interior (F.event t ht).retained_post := by |
| 116 | ext x |
| 117 | exact ⟨fun h => h ht, fun h _ => h⟩ |
| 118 | |
| 119 | end PoincareMT |