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.Singular.RegularLimit.Spacetime.SliceIdentifications |
| 2 | |
| 3 | /-! |
| 4 | # Old flow boxes in the singular-time extension |
| 5 | |
| 6 | The old carriers, intervals and Ricci flows are retained literally. Only the |
| 7 | maps to the ambient slices are transported through their smooth identifications. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | set_option backward.isDefEq.respectTransparency false |
| 12 | |
| 13 | open Set |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | theorem GeneralizedRicciFlowData.box_interval_subset |
| 23 | (F : GeneralizedRicciFlowData.{u}) (b : F.box_index) : |
| 24 | (F.box b).interval ⊆ F.interval := by |
| 25 | obtain ⟨U, _, hU⟩ := (F.box b).relatively_open |
| 26 | rw [hU] |
| 27 | exact inter_subset_left |
| 28 | |
| 29 | namespace SingularTimeAssumptions |
| 30 | |
| 31 | variable {M : Type u} [TopologicalSpace M] |
| 32 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 33 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 34 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 35 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 36 | |
| 37 | theorem oldBox_time_ne_terminal (H : SingularTimeAssumptions F T M) |
| 38 | (b : F.box_index) {t : ℝ} (ht : t ∈ (F.box b).interval) : t ≠ T := by |
| 39 | intro h |
| 40 | exact H.terminal_not_in_interval (h ▸ F.box_interval_subset b ht) |
| 41 | |
| 42 | theorem oldBox_relatively_open (H : SingularTimeAssumptions F T M) |
| 43 | (P04 : RicciFlowCurvatureTheory.{u}) (b : F.box_index) : |
| 44 | ∃ U : Set ℝ, IsOpen U ∧ |
| 45 | (F.box b).interval = H.extendedTimeInterval P04 ∩ U := by |
| 46 | obtain ⟨U, hU, heq⟩ := (F.box b).relatively_open |
| 47 | refine ⟨U ∩ Iio T, hU.inter isOpen_Iio, ?_⟩ |
| 48 | ext t |
| 49 | rw [heq] |
| 50 | constructor |
| 51 | · intro ht |
| 52 | exact ⟨H.old_times_subset_extendedTimeInterval P04 ht.1, ht.2, |
| 53 | (H.interval_preterminal ht.1).2⟩ |
| 54 | · rintro ⟨ht, hU, hT⟩ |
| 55 | refine ⟨?_, hU⟩ |
| 56 | rcases H.extendedTimeInterval_subset_old_union_terminal P04 ht with ht | ht |
| 57 | · exact ht |
| 58 | · exact (hT.ne ht).elim |
| 59 | |
| 60 | /-- An original generalized-flow box in the extended slices, with exactly |
| 61 | its original carrier, time interval and Ricci flow. -/ |
| 62 | def oldBox (H : SingularTimeAssumptions F T M) |
| 63 | (P04 : RicciFlowCurvatureTheory.{u}) (b : F.box_index) : |
| 64 | GeneralizedRicciFlowBox |
| 65 | (fun t => (H.extendedSliceGeometry P04 t).slice) |
| 66 | (fun t => (H.extendedSliceGeometry P04 t).metric) |
| 67 | (H.extendedTimeInterval P04) where |
| 68 | carrier := (F.box b).carrier |
| 69 | interval := (F.box b).interval |
| 70 | relatively_open := H.oldBox_relatively_open P04 b |
| 71 | flow := (F.box b).flow |
| 72 | forward := fun t ht => |
| 73 | H.oldSliceHomeomorph P04 (H.oldBox_time_ne_terminal b ht) ∘ (F.box b).forward t ht |
| 74 | inverse := fun t ht => |
| 75 | (F.box b).inverse t ht ∘ (H.oldSliceHomeomorph P04 (H.oldBox_time_ne_terminal b ht)).symm |
| 76 | forward_openEmbedding := fun t ht => |
| 77 | (H.oldSliceHomeomorph P04 (H.oldBox_time_ne_terminal b ht)).isOpenEmbedding.comp |
| 78 | ((F.box b).forward_openEmbedding t ht) |
| 79 | forward_smooth := fun t ht => |
| 80 | (H.oldSliceHomeomorph_smooth P04 (H.oldBox_time_ne_terminal b ht)).comp |
| 81 | ((F.box b).forward_smooth t ht) |
| 82 | inverse_smooth := by |
| 83 | intro t ht |
| 84 | apply ((F.box b).inverse_smooth t ht).comp |
| 85 | (H.oldSliceHomeomorph_symm_smooth P04 |
| 86 | (H.oldBox_time_ne_terminal b ht)).contMDiffOn |
| 87 | rintro z ⟨x, rfl⟩ |
| 88 | exact ⟨x, by simp only [Function.comp_apply, Homeomorph.symm_apply_apply]⟩ |
| 89 | left_inverse := by |
| 90 | intro t ht x |
| 91 | simpa only [Function.comp_apply, Homeomorph.symm_apply_apply] using |
| 92 | (F.box b).left_inverse t ht x |
| 93 | right_inverse := by |
| 94 | intro t ht z hz |
| 95 | rcases hz with ⟨x, rfl⟩ |
| 96 | simp only [Function.comp_apply, Homeomorph.symm_apply_apply, |
| 97 | (F.box b).left_inverse t ht x] |
| 98 | metric_pullback := by |
| 99 | intro t ht x v w |
| 100 | rw [mfderiv_comp x |
| 101 | ((H.oldSliceHomeomorph_smooth P04 |
| 102 | (H.oldBox_time_ne_terminal b ht)).mdifferentiable (by simp) _) |
| 103 | (((F.box b).forward_smooth t ht).mdifferentiable (by simp) x)] |
| 104 | exact (H.oldSliceHomeomorph_metric_pullback P04 (H.oldBox_time_ne_terminal b ht) |
| 105 | ((F.box b).forward t ht x) |
| 106 | (mfderiv (𝓡 3) (𝓡 3) ((F.box b).forward t ht) x v) |
| 107 | (mfderiv (𝓡 3) (𝓡 3) ((F.box b).forward t ht) x w)).trans |
| 108 | ((F.box b).metric_pullback t ht x v w) |
| 109 | |
| 110 | @[simp] theorem oldBox_carrier (H : SingularTimeAssumptions F T M) |
| 111 | (P04 : RicciFlowCurvatureTheory.{u}) (b : F.box_index) : |
| 112 | (H.oldBox P04 b).carrier = (F.box b).carrier := rfl |
| 113 | |
| 114 | @[simp] theorem oldBox_interval (H : SingularTimeAssumptions F T M) |
| 115 | (P04 : RicciFlowCurvatureTheory.{u}) (b : F.box_index) : |
| 116 | (H.oldBox P04 b).interval = (F.box b).interval := rfl |
| 117 | |
| 118 | @[simp] theorem oldBox_flow (H : SingularTimeAssumptions F T M) |
| 119 | (P04 : RicciFlowCurvatureTheory.{u}) (b : F.box_index) : |
| 120 | (H.oldBox P04 b).flow = (F.box b).flow := rfl |
| 121 | |
| 122 | theorem oldBox_forward (H : SingularTimeAssumptions F T M) |
| 123 | (P04 : RicciFlowCurvatureTheory.{u}) (b : F.box_index) |
| 124 | (t : ℝ) (ht : t ∈ (F.box b).interval) (x : (F.box b).carrier.carrier) : |
| 125 | (H.oldBox P04 b).forward t ht x = |
| 126 | H.oldSliceHomeomorph P04 (H.oldBox_time_ne_terminal b ht) |
| 127 | ((F.box b).forward t ht x) := rfl |
| 128 | |
| 129 | theorem oldBox_inverse (H : SingularTimeAssumptions F T M) |
| 130 | (P04 : RicciFlowCurvatureTheory.{u}) (b : F.box_index) |
| 131 | (t : ℝ) (ht : t ∈ (F.box b).interval) |
| 132 | (x : (H.extendedSliceGeometry P04 t).slice.carrier) : |
| 133 | (H.oldBox P04 b).inverse t ht x = |
| 134 | (F.box b).inverse t ht |
| 135 | ((H.oldSliceHomeomorph P04 (H.oldBox_time_ne_terminal b ht)).symm x) := rfl |
| 136 | |
| 137 | end SingularTimeAssumptions |
| 138 | |
| 139 | end PoincareMT |