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.StandardCap.Persistence.Limit.Cylinder.CylinderSlabSmooth |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Limit.Cylinder.CylinderEventSmooth |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Cylinder.EventNeighborhood |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Persistence.Cylinder.Stopping.PreterminalStopping |
| 5 | |
| 6 | /-! |
| 7 | # Local ordinary flow of a surviving physical cylinder |
| 8 | |
| 9 | Birth, ordinary interior and retained surgery times all have an |
| 10 | actual smooth Ricci coefficient neighborhood. No local finiteness |
| 11 | at the excluded endpoint is used. Morgan--Tian, Proposition 16.5, |
| 12 | pp. 374-375; see M44 derivation 62. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter |
| 19 | open scoped Manifold ContDiff Topology |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M44 |
| 24 | |
| 25 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 26 | |
| 27 | variable {F : SurgeryFlowData.{u}} {C : GeneralizedSliceCarrier.{u}} |
| 28 | {origin scale B : ℝ} {U : Set C.carrier} |
| 29 | |
| 30 | /-- Every included time of the surviving physical buffer has |
| 31 | a jointly smooth Ricci neighborhood within the observation |
| 32 | interval. Source: Proposition 16.5; M44 derivation 62. -/ |
| 33 | theorem cylinderTimeCoefficients_local_smooth_ricci |
| 34 | (P : M44CapPersistencePredecessors.{u}) (hpinch : SurgeryFlowPinched F) |
| 35 | (e : SurgeryFlowCylinder F C origin scale (Ico 0 B) U) (hU : IsOpen U) |
| 36 | (f : PartialDiffeomorph (𝓡 3) (𝓡 3) E C.carrier ∞) (hmap : f.target ⊆ U) |
| 37 | (r0 : ℝ) (hr0 : r0 ∈ Ico 0 B) (s : ℝ) (hs : s ∈ Ico 0 B) : |
| 38 | ∃ K : Set ℝ, K ∈ 𝓝 (origin + s / scale) ∧ origin + s / scale ∈ K ∧ |
| 39 | ContDiffOn ℝ ∞ (cylinderTimeCoefficients e f r0 hr0) |
| 40 | ((Ico origin (origin + B / scale) ∩ K) ×ˢ f.source) ∧ |
| 41 | ∀ t ∈ Ico origin (origin + B / scale) ∩ K, ∀ y ∈ f.source, |
| 42 | HasDerivWithinAt (fun r => cylinderTimeCoefficients e f r0 hr0 (r, y)) |
| 43 | (SpacetimeBounds.ricciFlowOperator 3 (SpacetimeBounds.metricTwoJet |
| 44 | (fun z => cylinderTimeCoefficients e f r0 hr0 (t, z)) y)) |
| 45 | (Ico origin (origin + B / scale) ∩ K) t := by |
| 46 | let J := Ico origin (origin + B / scale) |
| 47 | have hJI (t : ℝ) (ht : t ∈ J) : scale * (t - origin) ∈ Ico 0 B := |
| 48 | (cylinder_parameter_mem_ico e B t).mpr ht |
| 49 | have hdomain (t : ℝ) (ht : t ∈ J) : t ∈ F.time_domain := |
| 50 | cylinder_parameter_time_mem e (hJI t ht) |
| 51 | have htime : origin + s / scale ∈ F.time_domain := |
| 52 | e.time_subset (mem_image_of_mem _ hs) |
| 53 | have hend : origin + s / scale < origin + B / scale := by |
| 54 | linarith [(div_lt_div_iff_of_pos_right e.scale_pos).mpr hs.2] |
| 55 | by_cases hzero : s = 0 |
| 56 | · subst s |
| 57 | simp only [zero_div, add_zero] at htime hend ⊢ |
| 58 | obtain ⟨b, h0b, hbend, hNo⟩ := exists_surgery_free_right_interval F htime hend |
| 59 | have hslab : Icc origin b ⊆ F.time_domain := |
| 60 | fun t ht => hdomain t ⟨ht.1, ht.2.trans_lt hbend⟩ |
| 61 | have hr' : origin + 0 / scale ∈ Icc origin b := by simp [h0b.le] |
| 62 | have hresult := cylinderTimeCoefficients_slab_smooth_ricci e hU f hmap r0 hr0 |
| 63 | h0b hslab hNo 0 hs hr' |
| 64 | (J := J ∩ Iio b) (fun t ht => hJI t ht.1) |
| 65 | (fun _ ht => ⟨ht.1.1, ht.2.le⟩) |
| 66 | exact ⟨Iio b, Iio_mem_nhds h0b, h0b, hresult⟩ |
| 67 | · have hspos : 0 < s := lt_of_le_of_ne hs.1 (Ne.symm hzero) |
| 68 | have hstart : origin < origin + s / scale := by linarith [div_pos hspos e.scale_pos] |
| 69 | by_cases hT : origin + s / scale ∈ F.surgery_times |
| 70 | · let : Nonempty (F.slice (origin + s / scale)).carrier := ⟨e.forward s hs (f 0)⟩ |
| 71 | let event := F.event (origin + s / scale) hT |
| 72 | have hfree := event_preterminal_surgery_free P F hpinch hT |
| 73 | obtain ⟨r, hr, hr'⟩ := exists_preterminal_parameter e.scale_pos hspos event.tMinus_lt |
| 74 | have hrI : r ∈ Ico 0 B := ⟨hr.1, hr.2.trans hs.2⟩ |
| 75 | obtain ⟨b, hTb, hbend, hNo⟩ := exists_surgery_free_right_interval F htime hend |
| 76 | have hslab : Icc (origin + s / scale) b ⊆ F.time_domain := |
| 77 | fun t ht => hdomain t ⟨hstart.le.trans ht.1, ht.2.trans_lt hbend⟩ |
| 78 | let K := Ioo (max origin event.tMinus) b |
| 79 | have hK : K ∈ 𝓝 (origin + s / scale) := |
| 80 | Ioo_mem_nhds (max_lt hstart event.tMinus_lt) hTb |
| 81 | have hsK : origin + s / scale ∈ K := ⟨max_lt hstart event.tMinus_lt, hTb⟩ |
| 82 | have hresult := cylinderTimeCoefficients_event_smooth_ricci e hU f hmap r0 hr0 |
| 83 | s hs hT hfree r hrI hr' hTb hslab hNo |
| 84 | (J := J ∩ K) (fun t ht => hJI t ht.1) |
| 85 | (fun _ ht => ⟨(le_max_right _ _).trans_lt ht.2.1, ht.2.2⟩) |
| 86 | exact ⟨K, hK, hsK, hresult⟩ |
| 87 | · obtain ⟨a, b, hoa, hat, htb, hbe, hfree⟩ := |
| 88 | exists_surgery_free_closed_neighborhood F htime hstart hend hT |
| 89 | have hslab : Icc a b ⊆ F.time_domain := |
| 90 | fun t ht => hdomain t ⟨hoa.le.trans ht.1, ht.2.trans_lt hbe⟩ |
| 91 | have hNo := hfree.mono_right Ioc_subset_Icc_self |
| 92 | have hr' : origin + s / scale ∈ Icc a b := ⟨hat.le, htb.le⟩ |
| 93 | have hresult := cylinderTimeCoefficients_slab_smooth_ricci e hU f hmap r0 hr0 |
| 94 | (hat.trans htb) hslab hNo s hs hr' |
| 95 | (J := J ∩ Ioo a b) (fun t ht => hJI t ht.1) |
| 96 | (fun _ ht => ⟨ht.2.1.le, ht.2.2.le⟩) |
| 97 | exact ⟨Ioo a b, Ioo_mem_nhds hat htb, ⟨hat, htb⟩, hresult⟩ |
| 98 | |
| 99 | end PoincareMT.M44 |