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.Generalized.ReducedGeometry.PathCalculus |
| 2 | |
| 3 | /-! Ported from Mapher06/Poincare-MorganTian, `PoincareMT/Definitions/M14Exponential.lean`, |
| 4 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. Declaration bodies are unchanged; |
| 5 | imports and module placement are adapted. See |
| 6 | `references/ricci-flow/mapher/generalized-noncollapse-port.json`. -/ |
| 7 | |
| 8 | /-! |
| 9 | # M14 square-root exponential domains |
| 10 | |
| 11 | Morgan-Tian Definitions 6.17 and 6.25, pp. 113-118. The exponential is a |
| 12 | coherent family of actual ODE paths on its maximal domain in the horizontal |
| 13 | fiber and the admissible square-root time interval. Stable sets use the same |
| 14 | endpoint map, its actual Jacobi differential, and a local inverse on the |
| 15 | corresponding actual time slice. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | open scoped Manifold ContDiff Bundle Topology intervalIntegral |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT |
| 25 | |
| 26 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 27 | {I : SpacetimeInterval} |
| 28 | |
| 29 | def M14AdmissibleParameter |
| 30 | (G : GeneralizedLGeometryTransport n X time I) |
| 31 | (T : ℝ) (x : G.Point) : Set (G.Horizontal x × ℝ) := |
| 32 | {z | 0 ≤ z.2 ∧ T - z.2 ^ 2 ∈ I.domain} |
| 33 | |
| 34 | noncomputable def M14InitialVectorDerivative |
| 35 | (G : GeneralizedLGeometryTransport n X time I) |
| 36 | {x : G.Point} |
| 37 | (gamma : G.Horizontal x → ℝ → G.Point) (s : ℝ) |
| 38 | (Z : G.Horizontal x) : |
| 39 | G.Horizontal x →L[ℝ] TangentSpace (spacetimeModel n) (gamma Z s) := |
| 40 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 41 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 42 | mfderiv (𝓘(ℝ, G.Horizontal x)) (spacetimeModel n) |
| 43 | (fun V : G.Horizontal x => gamma V s) Z |
| 44 | |
| 45 | def M14HorizontalFamilySmooth |
| 46 | (G : GeneralizedLGeometryTransport n X time I) |
| 47 | {x : G.Point} |
| 48 | (gamma : G.Horizontal x → ℝ → G.Point) |
| 49 | (D : Set (G.Horizontal x × ℝ)) : Prop := |
| 50 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 51 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 52 | ContMDiffOn ((𝓘(ℝ, G.Horizontal x)).prod (𝓘(ℝ, ℝ))) |
| 53 | (spacetimeModel n) ∞ (fun z => gamma z.1 z.2) D |
| 54 | |
| 55 | def M14EndpointSliceSmooth |
| 56 | (G : GeneralizedLGeometryTransport n X time I) |
| 57 | {T : ℝ} {x : G.Point} {τ : ℝ} |
| 58 | (f : G.Horizontal x → (G.slices (T - τ)).Point) |
| 59 | (U : Set (G.Horizontal x)) : Prop := |
| 60 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 61 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 62 | ContMDiffOn (𝓘(ℝ, G.Horizontal x)) (𝓡 n) ∞ f U |
| 63 | |
| 64 | def M14InverseSliceSmooth |
| 65 | (G : GeneralizedLGeometryTransport n X time I) |
| 66 | {T : ℝ} {x : G.Point} {τ : ℝ} |
| 67 | (f : (G.slices (T - τ)).Point → G.Horizontal x) |
| 68 | (V : Set (G.slices (T - τ)).Point) : Prop := |
| 69 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 70 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 71 | ContMDiffOn (𝓡 n) (𝓘(ℝ, G.Horizontal x)) ∞ f V |
| 72 | |
| 73 | noncomputable def M14EndpointSliceMfderiv |
| 74 | (G : GeneralizedLGeometryTransport n X time I) |
| 75 | {T : ℝ} {x : G.Point} {τ : ℝ} |
| 76 | (f : G.Horizontal x → (G.slices (T - τ)).Point) |
| 77 | (Z : G.Horizontal x) : |
| 78 | G.Horizontal x →L[ℝ] TangentSpace (𝓡 n) (f Z) := |
| 79 | letI : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := |
| 80 | ⟨G.spacetime.horizontalMetric.toRiemannianMetric⟩ |
| 81 | mfderiv (𝓘(ℝ, G.Horizontal x)) (𝓡 n) f Z |
| 82 | |
| 83 | /-- An actual square-root Euler solution with prescribed initial velocity. |
| 84 | The endpoint is an output of this initial-value problem. -/ |
| 85 | structure M14SquareRootInitialValuePath |
| 86 | (G : GeneralizedLGeometryTransport n X time I) |
| 87 | (T τ : ℝ) (x y : G.Point) (Z : G.Horizontal x) where |
| 88 | path : M14BackwardPath G T 0 τ x y |
| 89 | square_path : M14SquareRootPath G path |
| 90 | extension : M14PullbackExtension G square_path.curve |
| 91 | (M14SqrtParameterInterval 0 τ) square_path.horizontal_velocity |
| 92 | euler : ∀ s ∈ M14SqrtParameterInterval 0 τ, ∀ W, |
| 93 | M14SquareRootEulerResidual G square_path extension s W = 0 |
| 94 | initial_velocity : ∃ h : square_path.curve 0 = x, |
| 95 | h ▸ square_path.horizontal_velocity 0 = (2 : ℝ) • Z |
| 96 | |
| 97 | /-- A coherent actual square-root ODE family on its maximal survival domain. -/ |
| 98 | structure M14ExponentialFamily |
| 99 | (G : GeneralizedLGeometryTransport n X time I) |
| 100 | (T : ℝ) (x : G.Point) where |
| 101 | base_time : G.spacetime.timeFunction x = T |
| 102 | domain : Set (G.Horizontal x × ℝ) |
| 103 | domain_admissible : domain ⊆ M14AdmissibleParameter G T x |
| 104 | domain_relative_open : ∀ z ∈ domain, ∃ U : Set (G.Horizontal x × ℝ), |
| 105 | IsOpen U ∧ z ∈ U ∧ U ∩ M14AdmissibleParameter G T x ⊆ domain |
| 106 | domain_zero : ∀ Z : G.Horizontal x, (Z, 0) ∈ domain |
| 107 | gamma : G.Horizontal x → ℝ → G.Point |
| 108 | gamma_at_zero : ∀ Z, gamma Z 0 = x |
| 109 | family_smooth : M14HorizontalFamilySmooth G gamma domain |
| 110 | joint_continuous : ContinuousOn |
| 111 | (fun z : G.Horizontal x × ℝ => gamma z.1 z.2) domain |
| 112 | clock : ∀ Z s, (Z, s) ∈ domain → |
| 113 | G.spacetime.timeFunction (gamma Z s) = T - s ^ 2 |
| 114 | path : ∀ Z s, (Z, s) ∈ domain → 0 < s → |
| 115 | M14BackwardPath G T 0 (s ^ 2) x (gamma Z s) |
| 116 | path_coherent : ∀ Z s hs hpos τ, τ ∈ Set.Icc 0 (s ^ 2) → |
| 117 | (path Z s hs hpos).curve τ = gamma Z (Real.sqrt τ) |
| 118 | path_extension : ∀ Z s hs hpos, |
| 119 | M14PullbackExtension G (path Z s hs hpos).curve |
| 120 | (Set.Ioo 0 (s ^ 2)) (path Z s hs hpos).horizontal_velocity |
| 121 | path_euler : ∀ Z s hs hpos, |
| 122 | M14EulerEquation G (path Z s hs hpos) |
| 123 | (path_extension Z s hs hpos) |
| 124 | positive_survival_iff : ∀ Z s, 0 < s → |
| 125 | ((Z, s) ∈ domain ↔ |
| 126 | ∃ y : G.Point, Nonempty (M14SquareRootInitialValuePath G T (s ^ 2) x y Z)) |
| 127 | initial_value_agreement : ∀ Z s (_hpos : 0 < s) (y : G.Point) |
| 128 | (P : M14SquareRootInitialValuePath G T (s ^ 2) x y Z), |
| 129 | Set.EqOn P.path.curve (fun τ => gamma Z (Real.sqrt τ)) (Set.Icc 0 (s ^ 2)) |
| 130 | square_path : ∀ Z s hs hpos, |
| 131 | M14SquareRootPath G (path Z s hs hpos) |
| 132 | square_extension : ∀ Z s hs hpos, |
| 133 | M14PullbackExtension G (square_path Z s hs hpos).curve |
| 134 | (M14SqrtParameterInterval 0 (s ^ 2)) |
| 135 | (square_path Z s hs hpos).horizontal_velocity |
| 136 | square_euler : ∀ Z s hs hpos, |
| 137 | ∀ r ∈ M14SqrtParameterInterval 0 (s ^ 2), ∀ W, |
| 138 | M14SquareRootEulerResidual G (square_path Z s hs hpos) |
| 139 | (square_extension Z s hs hpos) r W = 0 |
| 140 | square_initial_velocity : ∀ Z s hs hpos, |
| 141 | ∃ h : (square_path Z s hs hpos).curve 0 = x, |
| 142 | h ▸ (square_path Z s hs hpos).horizontal_velocity 0 = (2 : ℝ) • Z |
| 143 | action : G.Horizontal x → ℝ → ℝ |
| 144 | action_eq : ∀ Z s (hs : (Z, s) ∈ domain) (hpos : 0 < s), |
| 145 | action Z s = M14BackwardLAction G (path Z s hs hpos) |
| 146 | action_global_eq : ∀ Z s (hs : (Z, s) ∈ domain) (hpos : 0 < s), |
| 147 | M14IsMinimizing (path Z s hs hpos) → |
| 148 | action Z s = M14ActionValue G T 0 (s ^ 2) x (gamma Z s) |
| 149 | action_time_derivative : ∀ Z s (hs : (Z, s) ∈ domain) (hpos : 0 < s), |
| 150 | let R := square_path Z s hs hpos |
| 151 | HasDerivWithinAt (fun r : ℝ => action Z r) |
| 152 | ((1 / 2 : ℝ) * G.spacetime.horizontalMetric.inner (R.curve s) |
| 153 | (R.horizontal_velocity s) (R.horizontal_velocity s) + |
| 154 | 2 * s ^ 2 * horizontalScalarCurvature G.leafwise (R.curve s)) |
| 155 | {r | (Z, r) ∈ domain} s |
| 156 | reduced_length : G.Horizontal x → ℝ → ℝ |
| 157 | reduced_length_eq : ∀ Z s (_hs : (Z, s) ∈ domain) (_hpos : 0 < s), |
| 158 | reduced_length Z s = action Z s / (2 * s) |
| 159 | reduced_length_global_eq : ∀ Z s (hs : (Z, s) ∈ domain) (hpos : 0 < s), |
| 160 | M14IsMinimizing (path Z s hs hpos) → |
| 161 | reduced_length Z s = M14ReducedLengthValue G T 0 (s ^ 2) x (gamma Z s) |
| 162 | initial_derivative : ∀ Z s (hs : (Z, s) ∈ domain) (hpos : 0 < s), |
| 163 | ∃ h : (square_path Z s hs hpos).curve 0 = x, |
| 164 | h ▸ mfderivWithin (𝓘(ℝ, ℝ)) (spacetimeModel n) |
| 165 | (square_path Z s hs hpos).curve (M14SqrtParameterInterval 0 (s ^ 2)) |
| 166 | 0 (1 : ℝ) = |
| 167 | (2 : ℝ) • (Z : TangentSpace (spacetimeModel n) x) |
| 168 | differential : ∀ Z s (_hs : (Z, s) ∈ domain), |
| 169 | G.Horizontal x →L[ℝ] G.Horizontal (gamma Z s) |
| 170 | ambient_differential : ∀ Z s (_hs : (Z, s) ∈ domain), |
| 171 | G.Horizontal x →L[ℝ] TangentSpace (spacetimeModel n) (gamma Z s) |
| 172 | ambient_differential_eq : ∀ Z s (hs : (Z, s) ∈ domain), |
| 173 | ambient_differential Z s hs = |
| 174 | M14InitialVectorDerivative G gamma s Z |
| 175 | /-- Pointwise equality with the actual initial-vector `mfderiv`; the |
| 176 | horizontal output is compared through its tangent-space value. -/ |
| 177 | differential_pointwise_mfderiv : ∀ Z s (hs : (Z, s) ∈ domain) W, |
| 178 | (differential Z s hs W).val = |
| 179 | M14InitialVectorDerivative G gamma s Z W |
| 180 | differential_val_eq : ∀ Z s (hs : (Z, s) ∈ domain) W, |
| 181 | (differential Z s hs W).val = ambient_differential Z s hs W |
| 182 | differential_jacobi_map : ∀ Z s (hs : (Z, s) ∈ domain) |
| 183 | (hpos : 0 < s) (W : G.Horizontal x), |
| 184 | ∃ Q : M14JacobiFieldData G (square_path Z s hs hpos).curve |
| 185 | (M14SqrtParameterInterval 0 (s ^ 2)), |
| 186 | ∃ hEq : (square_path Z s hs hpos).curve s = gamma Z s, |
| 187 | differential Z s hs W = hEq ▸ Q.field s |
| 188 | jacobi_path : ∀ Z s hs hpos (W : G.Horizontal x), |
| 189 | {Q : M14JacobiFieldData G (square_path Z s hs hpos).curve |
| 190 | (M14SqrtParameterInterval 0 (s ^ 2)) // |
| 191 | Q.field 0 = 0 ∧ ∃ hEq : (square_path Z s hs hpos).curve 0 = x, |
| 192 | hEq ▸ M14JacobiFirstDerivative Q 0 = (2 : ℝ) • W} |
| 193 | jacobi_equation : ∀ Z s hs hpos (W : G.Horizontal x), |
| 194 | ∀ r ∈ M14SqrtParameterInterval 0 (s ^ 2), ∀ V, |
| 195 | M14JacobiResidual G (square_path Z s hs hpos) |
| 196 | (jacobi_path Z s hs hpos W).1 r V = 0 |
| 197 | differential_jacobi : ∀ Z s hs hpos (W : G.Horizontal x), |
| 198 | ∃ hEq : (square_path Z s hs hpos).curve s = gamma Z s, |
| 199 | differential Z s hs W = hEq ▸ ((jacobi_path Z s hs hpos W).1).field s |
| 200 | jacobi_initial_zero : ∀ Z s hs hpos (W : G.Horizontal x), |
| 201 | ((jacobi_path Z s hs hpos W).1).field 0 = 0 |
| 202 | jacobi_initial_derivative : ∀ Z s hs hpos (W : G.Horizontal x), |
| 203 | ∃ hEq : (square_path Z s hs hpos).curve 0 = x, |
| 204 | hEq ▸ M14JacobiFirstDerivative (jacobi_path Z s hs hpos W).1 0 = |
| 205 | (2 : ℝ) • W |
| 206 | maximal_lifetime : ∀ Z, Set.OrdConnected {s | (Z, s) ∈ domain} |
| 207 | |
| 208 | /-- The selected exponential branch uniquely minimizes to its own endpoint. -/ |
| 209 | def M14UniqueMinimizingBranch |
| 210 | (G : GeneralizedLGeometryTransport n X time I) |
| 211 | (T τ : ℝ) (x : G.Point) (E : M14ExponentialFamily G T x) |
| 212 | (Z : G.Horizontal x) : Prop := |
| 213 | (Z, Real.sqrt τ) ∈ E.domain ∧ |
| 214 | ∃ p : M14BackwardPath G T 0 τ x (E.gamma Z (Real.sqrt τ)), |
| 215 | Set.EqOn p.curve (fun r => E.gamma Z (Real.sqrt r)) (Set.Icc 0 τ) ∧ |
| 216 | M14IsMinimizing p ∧ |
| 217 | ∀ q : M14BackwardPath G T 0 τ x (E.gamma Z (Real.sqrt τ)), |
| 218 | M14IsMinimizing q → Set.EqOn q.curve p.curve (Set.Icc 0 τ) |
| 219 | |
| 220 | /-- Definition 6.25 requires a neighborhood of uniquely minimizing actual |
| 221 | branches, together with an invertible exponential differential at the point. -/ |
| 222 | def M14StableInitialVector |
| 223 | (G : GeneralizedLGeometryTransport n X time I) |
| 224 | (T τ : ℝ) (x : G.Point) (E : M14ExponentialFamily G T x) |
| 225 | (Z : G.Horizontal x) : Prop := |
| 226 | ∃ hZ : (Z, Real.sqrt τ) ∈ E.domain, |
| 227 | Function.Bijective (E.differential Z (Real.sqrt τ) hZ) ∧ |
| 228 | ∃ U : Set (G.Horizontal x), IsOpen U ∧ Z ∈ U ∧ |
| 229 | ∀ W ∈ U, M14UniqueMinimizingBranch G T τ x E W |
| 230 | |
| 231 | /-- A fixed-time stable minimizing set, which may be empty in a generalized flow. -/ |
| 232 | structure M14StableSet |
| 233 | (G : GeneralizedLGeometryTransport n X time I) |
| 234 | (T τ : ℝ) (x : G.Point) (E : M14ExponentialFamily G T x) where |
| 235 | tau_pos : 0 < τ |
| 236 | carrier : Set (G.Horizontal x) |
| 237 | carrier_open : IsOpen carrier |
| 238 | survivor : ∀ Z, Z ∈ carrier → (Z, Real.sqrt τ) ∈ E.domain |
| 239 | endpoint_map : G.Horizontal x → G.Point |
| 240 | endpoint_map_eq : ∀ Z, Z ∈ carrier → endpoint_map Z = E.gamma Z (Real.sqrt τ) |
| 241 | endpoint_time : ∀ Z, Z ∈ carrier → |
| 242 | G.spacetime.timeFunction (endpoint_map Z) = T - τ |
| 243 | endpoint_slice_map : G.Horizontal x → (G.slices (T - τ)).Point |
| 244 | endpoint_slice_map_val : ∀ Z, Z ∈ carrier → |
| 245 | (endpoint_slice_map Z).val = endpoint_map Z |
| 246 | endpoint_differential : ∀ Z (_hZ : Z ∈ carrier), |
| 247 | G.Horizontal x →L[ℝ] G.Horizontal (endpoint_map Z) |
| 248 | endpoint_differential_eq : ∀ Z (hZ : Z ∈ carrier), |
| 249 | (endpoint_map_eq Z hZ) ▸ endpoint_differential Z hZ = |
| 250 | E.differential Z (Real.sqrt τ) (survivor Z hZ) |
| 251 | endpoint_differential_bijective : ∀ Z (hZ : Z ∈ carrier), |
| 252 | Function.Bijective (endpoint_differential Z hZ) |
| 253 | endpoint_continuous : ContinuousOn endpoint_map carrier |
| 254 | endpoint_slice_continuous : ContinuousOn endpoint_slice_map carrier |
| 255 | endpoint_slice_smooth : M14EndpointSliceSmooth G endpoint_slice_map carrier |
| 256 | local_inverse : ∀ Z (_hZ : Z ∈ carrier), |
| 257 | ∃ U : Set (G.Horizontal x), ∃ V : Set (G.slices (T - τ)).Point, |
| 258 | ∃ inv : (G.slices (T - τ)).Point → G.Horizontal x, |
| 259 | IsOpen U ∧ IsOpen V ∧ Z ∈ U ∧ endpoint_slice_map Z ∈ V ∧ |
| 260 | U ⊆ carrier ∧ endpoint_slice_map '' U = V ∧ |
| 261 | ContinuousOn inv V ∧ |
| 262 | (∀ S : Set (G.Horizontal x), IsOpen S → S ⊆ U → |
| 263 | IsOpen (endpoint_slice_map '' S)) ∧ |
| 264 | (∀ q ∈ V, inv q ∈ U) ∧ |
| 265 | M14EndpointSliceSmooth G endpoint_slice_map U ∧ |
| 266 | M14InverseSliceSmooth G inv V ∧ |
| 267 | (∀ W, W ∈ U → inv (endpoint_slice_map W) = W) ∧ |
| 268 | (∀ q, q ∈ V → endpoint_slice_map (inv q) = q) |
| 269 | endpoint_slice_differential : ∀ Z (hZ : Z ∈ carrier) v, |
| 270 | (endpoint_slice_map_val Z hZ) ▸ |
| 271 | ((G.slices (T - τ)).tangentEquiv (endpoint_slice_map Z) |
| 272 | (M14EndpointSliceMfderiv G endpoint_slice_map Z v)).val = |
| 273 | (endpoint_differential Z hZ v).val |
| 274 | minimizing_path : ∀ Z (_hZ : Z ∈ carrier), |
| 275 | ∃ p : M14BackwardPath G T 0 τ x (endpoint_map Z), |
| 276 | Set.EqOn p.curve (fun r => E.gamma Z (Real.sqrt r)) (Set.Icc 0 τ) ∧ |
| 277 | M14IsMinimizing p ∧ |
| 278 | (∀ q : M14BackwardPath G T 0 τ x (endpoint_map Z), |
| 279 | M14IsMinimizing q → Set.EqOn q.curve p.curve (Set.Icc 0 τ)) |
| 280 | nonconjugate : ∀ Z (hZ : Z ∈ carrier), |
| 281 | Function.Bijective (endpoint_differential Z hZ) |
| 282 | carrier_exact : ∀ Z, Z ∈ carrier ↔ |
| 283 | M14StableInitialVector G T τ x E Z |
| 284 | local_stable_neighborhood : ∀ Z (_hZ : Z ∈ carrier), |
| 285 | ∃ U : Set (G.Horizontal x), |
| 286 | IsOpen U ∧ Z ∈ U ∧ U ⊆ carrier ∧ |
| 287 | ∀ W, W ∈ U → |
| 288 | M14UniqueMinimizingBranch G T τ x E W |
| 289 | |
| 290 | def M14StableGraph |
| 291 | (G : GeneralizedLGeometryTransport n X time I) |
| 292 | {T : ℝ} {x : G.Point} (E : M14ExponentialFamily G T x) : |
| 293 | Set (G.Horizontal x × ℝ) := |
| 294 | {z | ∃ τ : ℝ, ∃ H : M14StableSet G T τ x E, |
| 295 | 0 < τ ∧ z.1 ∈ H.carrier ∧ z.2 = Real.sqrt τ} |
| 296 | |
| 297 | /-- The qualified joint domain: the relative interior of the stable graph. -/ |
| 298 | def M14RelativeInterior {α : Type*} [TopologicalSpace α] |
| 299 | (A S : Set α) : Set α := |
| 300 | {z | z ∈ S ∧ ∃ U : Set α, IsOpen U ∧ z ∈ U ∧ U ∩ A ⊆ S} |
| 301 | |
| 302 | def M14JointDomain |
| 303 | (G : GeneralizedLGeometryTransport n X time I) |
| 304 | {T : ℝ} {x : G.Point} (E : M14ExponentialFamily G T x) : |
| 305 | Set (G.Horizontal x × ℝ) := |
| 306 | M14RelativeInterior (M14AdmissibleParameter G T x) (M14StableGraph G E) |
| 307 | |
| 308 | end PoincareMT |
| 309 |