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.Blowup.Construction.Generalized.WorldlineUniqueness |
| 2 | import PoincareLib.Geometry.Spacetime.Rescaling.Time |
| 3 | |
| 4 | /-! |
| 5 | # Raw cylinders supplied by a flow box |
| 6 | |
| 7 | Morgan--Tian Definitions 3.38 and 3.40, p. 61, and Corollary 11.3, p. 269. |
| 8 | A positive affine clock into one box gives a raw cylinder with exactly its |
| 9 | forward and inverse maps. Uniqueness then identifies any meeting cylinder |
| 10 | trajectory with the box line throughout their time overlap. This is the |
| 11 | local comparison needed before spatial gluing. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.M30.Cylinder |
| 22 | |
| 23 | /-- One ordinary box gives a raw cylinder at any positive affine clock |
| 24 | whose time image lies in the box (Definitions 3.38 and 3.40, p. 61). -/ |
| 25 | noncomputable def ofBox (F : GeneralizedRicciFlowData.{u}) (b : F.box_index) |
| 26 | (origin scale : ℝ) (hscale : 0 < scale) {I : Set ℝ} |
| 27 | (hI : I ⊆ (fun s : ℝ => origin + s / scale) ⁻¹' (F.box b).interval) : |
| 28 | GeneralizedFlowCylinder F (F.box b).carrier origin scale I univ where |
| 29 | scale_pos := hscale |
| 30 | forward s hs := (F.box b).forward (origin + s / scale) (hI hs) |
| 31 | inverse s hs := (F.box b).inverse (origin + s / scale) (hI hs) |
| 32 | forward_smooth s hs := ((F.box b).forward_smooth _ (hI hs)).contMDiffOn |
| 33 | inverse_smooth s hs := by |
| 34 | simpa only [image_univ] using (F.box b).inverse_smooth _ (hI hs) |
| 35 | left_inverse s hs x _ := (F.box b).left_inverse _ (hI hs) x |
| 36 | right_inverse s hs := by |
| 37 | simpa only [image_univ] using (F.box b).right_inverse _ (hI hs) |
| 38 | embedding := by |
| 39 | have hclock : Topology.IsEmbedding (fun s : I => origin + s.val / scale) := |
| 40 | (parabolicTimeOrderIso scale hscale origin).symm.toHomeomorph.isEmbedding.comp |
| 41 | Topology.IsEmbedding.subtypeVal |
| 42 | exact (F.box_openEmbedding b).isEmbedding.comp |
| 43 | ((hclock.codRestrict (F.box b).interval (fun s => hI s.property)).prodMap |
| 44 | Topology.IsEmbedding.subtypeVal) |
| 45 | vertical_compatibility s _ x _ := by |
| 46 | refine ⟨b, x, 1, zero_lt_one, ?_⟩ |
| 47 | intro s' hs' _ |
| 48 | exact ⟨hI hs', rfl⟩ |
| 49 | |
| 50 | /-- The raw box cylinder retains the original spacetime map |
| 51 | (Definition 3.38, p. 61). -/ |
| 52 | @[simp] theorem ofBox_pointMap (F : GeneralizedRicciFlowData.{u}) (b : F.box_index) |
| 53 | (origin scale : ℝ) (hscale : 0 < scale) {I : Set ℝ} |
| 54 | (hI : I ⊆ (fun s : ℝ => origin + s / scale) ⁻¹' (F.box b).interval) |
| 55 | (s : ℝ) (hs : s ∈ I) (x : (F.box b).carrier.carrier) : |
| 56 | (ofBox F b origin scale hscale hI).pointMap s hs x = |
| 57 | (⟨origin + s / scale, (F.box b).forward _ (hI hs) x⟩ : F.point) := rfl |
| 58 | |
| 59 | /-- The raw box pullback is exactly the scaled ordinary metric |
| 60 | (Definition 3.40, p. 61). -/ |
| 61 | @[simp] theorem ofBox_pullbackInner (F : GeneralizedRicciFlowData.{u}) (b : F.box_index) |
| 62 | (origin scale : ℝ) (hscale : 0 < scale) {I : Set ℝ} |
| 63 | (hI : I ⊆ (fun s : ℝ => origin + s / scale) ⁻¹' (F.box b).interval) |
| 64 | (s : ℝ) (hs : s ∈ I) (x : (F.box b).carrier.carrier) |
| 65 | (v w : TangentSpace (𝓡 3) x) : |
| 66 | (ofBox F b origin scale hscale hI).pullbackInner s hs x v w = |
| 67 | scale * ((F.box b).flow.metric (origin + s / scale)).inner x v w := by |
| 68 | exact congrArg (scale * ·) ((F.box b).metric_pullback _ (hI hs) x v w) |
| 69 | |
| 70 | /-- A cylinder line meeting a box line stays equal to it whenever both |
| 71 | times are defined (Definition 3.38, p. 61; Corollary 11.3, p. 269). -/ |
| 72 | theorem forward_eq_box_on_overlap |
| 73 | {F : GeneralizedRicciFlowData.{u}} {C : GeneralizedSliceCarrier.{u}} |
| 74 | {origin scale : ℝ} {I : Set ℝ} {U : Set C.carrier} |
| 75 | (e : GeneralizedFlowCylinder F C origin scale I U) (hI : I.OrdConnected) |
| 76 | {x : C.carrier} (hx : x ∈ U) (b : F.box_index) (y : (F.box b).carrier.carrier) |
| 77 | {s : ℝ} (hs : s ∈ I) (hb : origin + s / scale ∈ (F.box b).interval) |
| 78 | (hmeet : e.forward s hs x = (F.box b).forward _ hb y) : |
| 79 | ∀ t (ht : t ∈ I) (htb : origin + t / scale ∈ (F.box b).interval), |
| 80 | e.forward t ht x = (F.box b).forward _ htb y := by |
| 81 | let K := I ∩ (fun t : ℝ => origin + t / scale) ⁻¹' (F.box b).interval |
| 82 | have hK : K.OrdConnected := hI.inter ((F.box b).flow.interval.preimage_mono |
| 83 | (parabolicTimeInv_strictMono scale e.scale_pos origin).monotone) |
| 84 | let eK := restrict e (show K ⊆ I from inter_subset_left) Subset.rfl |
| 85 | let eB := ofBox F b origin scale e.scale_pos |
| 86 | (show K ⊆ (fun t : ℝ => origin + t / scale) ⁻¹' (F.box b).interval from |
| 87 | inter_subset_right) |
| 88 | have heq : eK.pointMap s ⟨hs, hb⟩ x = eB.pointMap s ⟨hs, hb⟩ y := |
| 89 | congrArg (fun z => (⟨origin + s / scale, z⟩ : F.point)) hmeet |
| 90 | have hall := pointMap_eq_on_interval eK eB hK hx (mem_univ y) ⟨hs, hb⟩ heq |
| 91 | intro t ht htb |
| 92 | exact eq_of_heq (Sigma.mk.inj_iff.mp (hall t ⟨ht, htb⟩)).2 |
| 93 | |
| 94 | end PoincareMT.M30.Cylinder |