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.Induction.Schedules.InitialFlow.InitialSlabTransport |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Schedules.Constants.ProducerEndpoints |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Schedules.Prefix.InitialGeometry |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Continuation.Construction.RegularHistory |
| 5 | |
| 6 | /-! |
| 7 | # Initial control of every actual raw surgery flow |
| 8 | |
| 9 | Morgan--Tian Claim 15.1, p. 353, and the discussion before Definition |
| 10 | 15.7, p. 360. Uniqueness identifies every initial regular slab with the |
| 11 | ordinary seed. Maximality excludes a first surgery through time 1/16. |
| 12 | The estimate concerns actual domain times, including regular endpoints. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle ENNReal Topology |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M45 |
| 23 | |
| 24 | /-- A surgery-free initial interval inherits the seed's curvature bound |
| 25 | on its actual terminal slice. The initial-control argument on p. 360. -/ |
| 26 | theorem initial_curvature_on_free_interval (F : SurgeryFlowData.{u}) |
| 27 | (hunique : RicciFlowUniqueness 3 (F.slice 0).carrier) |
| 28 | (G : RicciFlow 3 (F.slice 0).carrier (Icc 0 (1 / 16 : ℝ))) |
| 29 | (hG : G.metric 0 = F.metric 0) |
| 30 | (hRm : ∀ t ∈ Icc 0 (1 / 16 : ℝ), ∀ x : (F.slice 0).carrier, |
| 31 | (G.connection t).curvatureTensorNorm x ≤ 2) |
| 32 | {t : ℝ} (ht : 0 < t) (htF : t ∈ F.time_domain) (htB : t ≤ 1 / 16) |
| 33 | (hfree : Disjoint F.surgery_times (Ioc 0 t)) (x : (F.slice t).carrier) : |
| 34 | (F.connection t).curvatureTensorNorm x ≤ 2 := by |
| 35 | let S := F.regular_slabs 0 t ht |
| 36 | (F.time_domain_interval.out F.zero_mem htF) hfree |
| 37 | let tt : Icc 0 t := ⟨t, ht.le, le_rfl⟩ |
| 38 | have heq := initialSlab_curvature_eq F hunique G hG htB S tt ((S.identify tt).symm x) |
| 39 | have hbound := hRm t ⟨ht.le, htB⟩ ((S.identify tt).symm x) |
| 40 | simpa only [Diffeomorph.apply_symm_apply] using heq.trans_le hbound |
| 41 | |
| 42 | /-- Local finiteness and maximality exclude a first early surgery when |
| 43 | all preceding regular slices have bounded curvature. The argument on p. 360. -/ |
| 44 | theorem no_initial_surgery_of_regular_curvature (F : SurgeryFlowData.{u}) |
| 45 | (hbound : ∀ t : ℝ, 0 < t → t ∈ F.time_domain → t ≤ 1 / 16 → |
| 46 | Disjoint F.surgery_times (Ioc 0 t) → |
| 47 | ∀ x : (F.slice t).carrier, (F.connection t).curvatureTensorNorm x ≤ 2) : |
| 48 | Disjoint F.surgery_times (Icc 0 (1 / 16 : ℝ)) := by |
| 49 | classical |
| 50 | let : Nonempty (F.slice 0).carrier := F.initial_nonempty |
| 51 | apply Set.disjoint_left.mpr |
| 52 | intro T hT htB |
| 53 | have hprefix : Icc 0 T ⊆ F.time_domain := |
| 54 | F.time_domain_interval.out F.zero_mem (F.surgery_times_subset hT) |
| 55 | have hfinite := F.surgery_times_finite_on_compact isCompact_Icc hprefix |
| 56 | obtain ⟨b, hb, hminimal⟩ := Set.exists_min_image |
| 57 | (F.surgery_times ∩ Icc 0 T) (fun s : ℝ => s) hfinite |
| 58 | ⟨T, hT, htB.1, le_rfl⟩ |
| 59 | have hbpos : 0 < b := lt_of_le_of_ne hb.2.1 (by |
| 60 | intro h |
| 61 | exact F.zero_not_surgery (h ▸ hb.1)) |
| 62 | have hbF : b ∈ F.time_domain := F.surgery_times_subset hb.1 |
| 63 | have hJ : Icc 0 b ⊆ F.time_domain := F.time_domain_interval.out F.zero_mem hbF |
| 64 | have hfree : Disjoint F.surgery_times (Ioo 0 b) := by |
| 65 | apply Set.disjoint_left.mpr |
| 66 | intro s hs hsb |
| 67 | exact (not_lt_of_ge (hminimal s ⟨hs, hsb.1.le, hsb.2.le.trans hb.2.2⟩)) hsb.2 |
| 68 | obtain ⟨t, ht, x, hx⟩ := F.maximal_intervals 0 b F.zero_mem (Or.inl rfl) |
| 69 | hbpos (Ico_subset_Icc_self.trans hJ) hfree (Or.inl hb.1) 2 0 hbpos |
| 70 | have htpos : 0 < t := by simpa only [max_self] using ht.1 |
| 71 | have htF : t ∈ F.time_domain := hJ ⟨htpos.le, ht.2.le⟩ |
| 72 | have htB' : t ≤ 1 / 16 := ht.2.le.trans (hb.2.2.trans htB.2) |
| 73 | have hfree' : Disjoint F.surgery_times (Ioc 0 t) := by |
| 74 | apply Set.disjoint_left.mpr |
| 75 | intro s hs hst |
| 76 | exact Set.disjoint_left.mp hfree hs ⟨hst.1, hst.2.trans_lt ht.2⟩ |
| 77 | exact (not_lt_of_ge (hbound t htpos htF htB' hfree' x)) hx |
| 78 | |
| 79 | /-- Capture the literal initial ordinary seed in every supplied raw flow, |
| 80 | without extending an included regular endpoint. Claim 15.1, p. 353, and |
| 81 | the discussion before Definition 15.7, p. 360. -/ |
| 82 | theorem initialCaptureProducer |
| 83 | (h03 : ∀ (M : Type u) [TopologicalSpace M] [T2Space M] |
| 84 | [SecondCountableTopology M] |
| 85 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 86 | [IsManifold (𝓡 3) ∞ M] [CompactSpace M], RicciFlowLocalTheory 3 M) : |
| 87 | InitialCaptureProducer.{u} := by |
| 88 | intro epsilon kappa _hepsilon _hle _hkappa seed F |
| 89 | let : CompactSpace (F.slice 0).carrier := |
| 90 | isCompact_univ_iff.mp (F.slices_compact 0 F.zero_mem) |
| 91 | obtain ⟨G, hG, _hD, hRm, hvolume⟩ := seed F.normalizedInitialData |
| 92 | change G.metric 0 = F.metric 0 at hG |
| 93 | have hunique := (h03 (F.slice 0).carrier).2.1 |
| 94 | have hbound (t : ℝ) := initial_curvature_on_free_interval F hunique G hG hRm (t := t) |
| 95 | have hfree := no_initial_surgery_of_regular_curvature F |
| 96 | (fun t ht htF htB hfree x => hbound t ht htF htB hfree x) |
| 97 | refine ⟨hfree, ?_⟩ |
| 98 | intro t htF htB x |
| 99 | have ht0 : 0 ≤ t := F.time_domain_nonnegative htF |
| 100 | have hfree' : Disjoint F.surgery_times (Ioc 0 t) := |
| 101 | hfree.mono_right (show Ioc 0 t ⊆ Icc 0 (1 / 16 : ℝ) from |
| 102 | fun _ hs => ⟨hs.1.le, hs.2.trans htB⟩) |
| 103 | have hcurv : (F.connection t).curvatureTensorNorm x ≤ 2 := by |
| 104 | by_cases htzero : t = 0 |
| 105 | · subst t |
| 106 | exact (F.initial_normalized x).1.trans (by norm_num) |
| 107 | · exact hbound t (lt_of_le_of_ne ht0 (Ne.symm htzero)) htF htB hfree' x |
| 108 | refine ⟨hcurv, scalar_le_eighteen_of_curvature_le_two (F.connection t) x hcurv, ?_⟩ |
| 109 | intro r hr hrepsilon |
| 110 | by_cases htzero : t = 0 |
| 111 | · subst t |
| 112 | have h := hvolume 0 (by norm_num) x r hr hrepsilon |
| 113 | simpa only [hG] using h |
| 114 | · have htpos : 0 < t := lt_of_le_of_ne ht0 (Ne.symm htzero) |
| 115 | let S := F.regular_slabs 0 t htpos |
| 116 | (F.time_domain_interval.out F.zero_mem htF) hfree' |
| 117 | let tt : Icc 0 t := ⟨t, ht0, le_rfl⟩ |
| 118 | have htransport := initialSlab_ball_volume_eq F hunique G hG htB S tt |
| 119 | ((S.identify tt).symm x) r |
| 120 | have h := hvolume t ⟨ht0, htB⟩ ((S.identify tt).symm x) r hr hrepsilon |
| 121 | simpa only [Diffeomorph.apply_symm_apply] using h.trans_eq htransport.symm |
| 122 | |
| 123 | end PoincareMT.M45 |