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.Carrier |
| 2 | |
| 3 | /-! |
| 4 | # Identifications of old and terminal slices |
| 5 | |
| 6 | Equality of the linked slice geometry transports the manifold, metric and |
| 7 | connection together. This provides smooth identifications without separating |
| 8 | the dependent casts for these three objects. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | noncomputable section |
| 19 | |
| 20 | namespace PoincareMT.SingularRegularLimit.SliceGeometry |
| 21 | |
| 22 | variable {G K : SliceGeometry.{u}} |
| 23 | |
| 24 | def homeomorphOfEq (h : G = K) : G.slice.carrier ≃ₜ K.slice.carrier := by |
| 25 | subst K |
| 26 | exact Homeomorph.refl _ |
| 27 | |
| 28 | @[simp] theorem homeomorphOfEq_refl (G : SliceGeometry.{u}) : |
| 29 | homeomorphOfEq (rfl : G = G) = Homeomorph.refl _ := rfl |
| 30 | |
| 31 | @[simp] theorem homeomorphOfEq_symm (h : G = K) : |
| 32 | (homeomorphOfEq h).symm = homeomorphOfEq h.symm := by |
| 33 | subst K |
| 34 | rfl |
| 35 | |
| 36 | theorem homeomorphOfEq_smooth (h : G = K) : |
| 37 | ContMDiff (𝓡 3) (𝓡 3) ∞ (homeomorphOfEq h) := by |
| 38 | subst K |
| 39 | exact contMDiff_id |
| 40 | |
| 41 | theorem homeomorphOfEq_symm_smooth (h : G = K) : |
| 42 | ContMDiff (𝓡 3) (𝓡 3) ∞ (homeomorphOfEq h).symm := by |
| 43 | rw [homeomorphOfEq_symm] |
| 44 | exact homeomorphOfEq_smooth h.symm |
| 45 | |
| 46 | theorem homeomorphOfEq_mfderiv_bijective (h : G = K) (x : G.slice.carrier) : |
| 47 | Function.Bijective (mfderiv (𝓡 3) (𝓡 3) (homeomorphOfEq h) x) := by |
| 48 | subst K |
| 49 | change Function.Bijective (mfderiv (𝓡 3) (𝓡 3) id x) |
| 50 | rw [mfderiv_id] |
| 51 | exact ⟨fun _ _ h => h, fun y => ⟨y, rfl⟩⟩ |
| 52 | |
| 53 | theorem homeomorphOfEq_metric_pullback (h : G = K) (x : G.slice.carrier) |
| 54 | (v w : TangentSpace (𝓡 3) x) : |
| 55 | K.metric.inner (homeomorphOfEq h x) |
| 56 | (mfderiv (𝓡 3) (𝓡 3) (homeomorphOfEq h) x v) |
| 57 | (mfderiv (𝓡 3) (𝓡 3) (homeomorphOfEq h) x w) = G.metric.inner x v w := by |
| 58 | subst K |
| 59 | change G.metric.inner x (mfderiv (𝓡 3) (𝓡 3) id x v) |
| 60 | (mfderiv (𝓡 3) (𝓡 3) id x w) = _ |
| 61 | rw [mfderiv_id] |
| 62 | rfl |
| 63 | |
| 64 | theorem homeomorphOfEq_scalar_pullback (h : G = K) (x : G.slice.carrier) : |
| 65 | K.connection.scalarCurvature (homeomorphOfEq h x) = G.connection.scalarCurvature x := by |
| 66 | subst K |
| 67 | rfl |
| 68 | |
| 69 | end PoincareMT.SingularRegularLimit.SliceGeometry |
| 70 | |
| 71 | namespace PoincareMT.SingularTimeAssumptions |
| 72 | |
| 73 | open SingularRegularLimit |
| 74 | |
| 75 | variable {M : Type u} [TopologicalSpace M] |
| 76 | [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] |
| 77 | [IsManifold (𝓡 3) ∞ M] [MeasurableSpace M] [BorelSpace M] |
| 78 | [T2Space M] [T3Space M] [SecondCountableTopology M] |
| 79 | {F : GeneralizedRicciFlowData.{u}} {T : ℝ} |
| 80 | |
| 81 | /-- The canonical identification from an old slice into the extended slice. -/ |
| 82 | def oldSliceHomeomorph (H : SingularTimeAssumptions F T M) |
| 83 | (P04 : RicciFlowCurvatureTheory.{u}) {t : ℝ} (ht : t ≠ T) : |
| 84 | (F.slice t).carrier ≃ₜ (H.extendedSliceGeometry P04 t).slice.carrier := |
| 85 | SliceGeometry.homeomorphOfEq (H.extendedSliceGeometry_of_ne P04 ht).symm |
| 86 | |
| 87 | theorem oldSliceHomeomorph_smooth (H : SingularTimeAssumptions F T M) |
| 88 | (P04 : RicciFlowCurvatureTheory.{u}) {t : ℝ} (ht : t ≠ T) : |
| 89 | ContMDiff (𝓡 3) (𝓡 3) ∞ (H.oldSliceHomeomorph P04 ht) := |
| 90 | SliceGeometry.homeomorphOfEq_smooth (H.extendedSliceGeometry_of_ne P04 ht).symm |
| 91 | |
| 92 | theorem oldSliceHomeomorph_symm_smooth (H : SingularTimeAssumptions F T M) |
| 93 | (P04 : RicciFlowCurvatureTheory.{u}) {t : ℝ} (ht : t ≠ T) : |
| 94 | ContMDiff (𝓡 3) (𝓡 3) ∞ (H.oldSliceHomeomorph P04 ht).symm := |
| 95 | SliceGeometry.homeomorphOfEq_symm_smooth (H.extendedSliceGeometry_of_ne P04 ht).symm |
| 96 | |
| 97 | theorem oldSliceHomeomorph_metric_pullback (H : SingularTimeAssumptions F T M) |
| 98 | (P04 : RicciFlowCurvatureTheory.{u}) {t : ℝ} (ht : t ≠ T) |
| 99 | (x : (F.slice t).carrier) (v w : TangentSpace (𝓡 3) x) : |
| 100 | (H.extendedSliceGeometry P04 t).metric.inner (H.oldSliceHomeomorph P04 ht x) |
| 101 | (mfderiv (𝓡 3) (𝓡 3) (H.oldSliceHomeomorph P04 ht) x v) |
| 102 | (mfderiv (𝓡 3) (𝓡 3) (H.oldSliceHomeomorph P04 ht) x w) = |
| 103 | (F.metric t).inner x v w := |
| 104 | SliceGeometry.homeomorphOfEq_metric_pullback |
| 105 | (G := SliceGeometry.ofFlow F t) (K := H.extendedSliceGeometry P04 t) |
| 106 | (H.extendedSliceGeometry_of_ne P04 ht).symm x v w |
| 107 | |
| 108 | theorem oldSliceHomeomorph_scalar_pullback (H : SingularTimeAssumptions F T M) |
| 109 | (P04 : RicciFlowCurvatureTheory.{u}) {t : ℝ} (ht : t ≠ T) |
| 110 | (x : (F.slice t).carrier) : |
| 111 | (H.extendedSliceGeometry P04 t).connection.scalarCurvature |
| 112 | (H.oldSliceHomeomorph P04 ht x) = (F.connection t).scalarCurvature x := |
| 113 | SliceGeometry.homeomorphOfEq_scalar_pullback |
| 114 | (G := SliceGeometry.ofFlow F t) (K := H.extendedSliceGeometry P04 t) |
| 115 | (H.extendedSliceGeometry_of_ne P04 ht).symm x |
| 116 | |
| 117 | /-- The terminal slice identified with its full, possibly empty regular region. -/ |
| 118 | def terminalSliceHomeomorph (H : SingularTimeAssumptions F T M) |
| 119 | (P04 : RicciFlowCurvatureTheory.{u}) : |
| 120 | (H.extendedSliceGeometry P04 T).slice.carrier ≃ₜ H.regularRegion P04 := |
| 121 | SliceGeometry.homeomorphOfEq (H.extendedSliceGeometry_terminal P04) |
| 122 | |
| 123 | theorem terminalSliceHomeomorph_smooth (H : SingularTimeAssumptions F T M) |
| 124 | (P04 : RicciFlowCurvatureTheory.{u}) : |
| 125 | ContMDiff (𝓡 3) (𝓡 3) ∞ (H.terminalSliceHomeomorph P04) := |
| 126 | SliceGeometry.homeomorphOfEq_smooth (H.extendedSliceGeometry_terminal P04) |
| 127 | |
| 128 | theorem terminalSliceHomeomorph_symm_smooth (H : SingularTimeAssumptions F T M) |
| 129 | (P04 : RicciFlowCurvatureTheory.{u}) : |
| 130 | ContMDiff (𝓡 3) (𝓡 3) ∞ (H.terminalSliceHomeomorph P04).symm := |
| 131 | SliceGeometry.homeomorphOfEq_symm_smooth (H.extendedSliceGeometry_terminal P04) |
| 132 | |
| 133 | theorem terminalSliceHomeomorph_mfderiv_bijective (H : SingularTimeAssumptions F T M) |
| 134 | (P04 : RicciFlowCurvatureTheory.{u}) |
| 135 | (x : (H.extendedSliceGeometry P04 T).slice.carrier) : |
| 136 | Function.Bijective (mfderiv (𝓡 3) (𝓡 3) (H.terminalSliceHomeomorph P04) x) := |
| 137 | SliceGeometry.homeomorphOfEq_mfderiv_bijective (H.extendedSliceGeometry_terminal P04) x |
| 138 | |
| 139 | theorem terminalSliceHomeomorph_metric_pullback (H : SingularTimeAssumptions F T M) |
| 140 | (P04 : RicciFlowCurvatureTheory.{u}) |
| 141 | (x : (H.extendedSliceGeometry P04 T).slice.carrier) (v w : TangentSpace (𝓡 3) x) : |
| 142 | (H.terminalMetric P04).inner (H.terminalSliceHomeomorph P04 x) |
| 143 | (mfderiv (𝓡 3) (𝓡 3) (H.terminalSliceHomeomorph P04) x v) |
| 144 | (mfderiv (𝓡 3) (𝓡 3) (H.terminalSliceHomeomorph P04) x w) = |
| 145 | (H.extendedSliceGeometry P04 T).metric.inner x v w := |
| 146 | SliceGeometry.homeomorphOfEq_metric_pullback |
| 147 | (G := H.extendedSliceGeometry P04 T) (K := H.terminalSliceGeometry P04) |
| 148 | (H.extendedSliceGeometry_terminal P04) x v w |
| 149 | |
| 150 | theorem terminalSliceHomeomorph_scalar_pullback (H : SingularTimeAssumptions F T M) |
| 151 | (P04 : RicciFlowCurvatureTheory.{u}) |
| 152 | (x : (H.extendedSliceGeometry P04 T).slice.carrier) : |
| 153 | (H.terminalConnection P04).scalarCurvature (H.terminalSliceHomeomorph P04 x) = |
| 154 | (H.extendedSliceGeometry P04 T).connection.scalarCurvature x := |
| 155 | SliceGeometry.homeomorphOfEq_scalar_pullback |
| 156 | (G := H.extendedSliceGeometry P04 T) (K := H.terminalSliceGeometry P04) |
| 157 | (H.extendedSliceGeometry_terminal P04) x |
| 158 | |
| 159 | end PoincareMT.SingularTimeAssumptions |