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.Spacetime.Product.Frame |
| 2 | |
| 3 | /-! |
| 4 | # Scalar differentiation in actual spacetime directions |
| 5 | |
| 6 | The genuine split identifies scalar directional derivatives with spatial |
| 7 | and ordinary time derivatives. This is the coordinate calculus used in |
| 8 | MT2015Correction p. 2, before equations (0.1)-(0.2). |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle |
| 15 | |
| 16 | namespace PoincareMT.M62.SpacetimeCharts |
| 17 | |
| 18 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 19 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 20 | {a b : ℝ} |
| 21 | |
| 22 | /-- The actual spacetime differential splits into spatial and time partial |
| 23 | derivatives; MT2015Correction p. 2, the coordinate directions before (0.1). -/ |
| 24 | theorem mvfderiv_product_scalar (C : SpacetimeCharts n M a b) |
| 25 | (f : M × ℝ → ℝ) (q : C.Point) |
| 26 | (hf : MDifferentiableAt ((𝓡 n).prod 𝓘(ℝ, ℝ)) 𝓘(ℝ, ℝ) |
| 27 | f (q.1, (q.2 : ℝ))) |
| 28 | (V : TangentSpace (𝓡 (n + 1)) q) : |
| 29 | mvfderiv (𝓡 (n + 1)) (fun r : C.Point => f (r.1, (r.2 : ℝ))) q V = |
| 30 | mvfderiv (𝓡 n) (fun p => f (p, (q.2 : ℝ))) q.1 (C.split q V).1 + |
| 31 | (C.split q V).2 * deriv (fun t => f (q.1, t)) q.2 := by |
| 32 | let := C.chartedSpace |
| 33 | have hs := C.contMDiff_space.mdifferentiableAt (x := q) (by simp) |
| 34 | have ht := C.contMDiff_clock.mdifferentiableAt (x := q) (by simp) |
| 35 | have hchain := mfderiv_comp_apply |
| 36 | (f := fun r : C.Point => (r.1, (r.2 : ℝ))) (g := f) |
| 37 | q hf (hs.prodMk ht) V |
| 38 | rw [mfderiv_prodMk hs ht] at hchain |
| 39 | have hsplit := mfderiv_prod_eq_add_apply |
| 40 | (I := 𝓡 n) (I' := 𝓘(ℝ, ℝ)) (I'' := 𝓘(ℝ, ℝ)) |
| 41 | (v := ((C.split q V).1, (C.split q V).2)) hf |
| 42 | have htime : mfderiv 𝓘(ℝ, ℝ) 𝓘(ℝ, ℝ) |
| 43 | (fun t => f (q.1, t)) (q.2 : ℝ) (C.split q V).2 = |
| 44 | (C.split q V).2 * deriv (fun t => f (q.1, t)) q.2 := by |
| 45 | rw [mfderiv_eq_fderiv] |
| 46 | change fderiv ℝ (fun t => f (q.1, t)) (q.2 : ℝ) (C.split q V).2 = _ |
| 47 | simpa only [smul_eq_mul] using |
| 48 | (fderiv_eq_smul_deriv (𝕜 := ℝ) (f := fun t => f (q.1, t)) |
| 49 | (x := (q.2 : ℝ)) (C.split q V).2) |
| 50 | rw [htime] at hsplit |
| 51 | change mfderiv (𝓡 (n + 1)) 𝓘(ℝ, ℝ) |
| 52 | (fun r : C.Point => f (r.1, (r.2 : ℝ))) q V = |
| 53 | mfderiv ((𝓡 n).prod 𝓘(ℝ, ℝ)) 𝓘(ℝ, ℝ) f (q.1, (q.2 : ℝ)) |
| 54 | (mfderiv (𝓡 (n + 1)) (𝓡 n) (Prod.fst : C.Point → M) q V, |
| 55 | mfderiv (𝓡 (n + 1)) 𝓘(ℝ, ℝ) (fun r : C.Point => (r.2 : ℝ)) q V) at hchain |
| 56 | rw [← C.split_space, ← C.split_time] at hchain |
| 57 | exact hchain.trans hsplit |
| 58 | |
| 59 | /-- Horizontal differentiation is spatial differentiation at fixed time; |
| 60 | MT2015Correction p. 2, the spatial directions in (0.1). -/ |
| 61 | theorem mvfderiv_product_horizontal (C : SpacetimeCharts n M a b) |
| 62 | (f : M × ℝ → ℝ) (q : C.Point) |
| 63 | (hf : MDifferentiableAt ((𝓡 n).prod 𝓘(ℝ, ℝ)) 𝓘(ℝ, ℝ) |
| 64 | f (q.1, (q.2 : ℝ))) |
| 65 | (V : TangentSpace (𝓡 n) q.1) : |
| 66 | mvfderiv (𝓡 (n + 1)) (fun r : C.Point => f (r.1, (r.2 : ℝ))) q |
| 67 | (C.horizontal q V) = |
| 68 | mvfderiv (𝓡 n) (fun p => f (p, (q.2 : ℝ))) q.1 V := by |
| 69 | rw [C.mvfderiv_product_scalar f q hf] |
| 70 | simp [horizontal] |
| 71 | |
| 72 | /-- Differentiation along unit time is the ordinary fixed-point derivative; |
| 73 | MT2015Correction p. 2, the time direction in (0.2). -/ |
| 74 | theorem mvfderiv_product_time (C : SpacetimeCharts n M a b) |
| 75 | (f : M × ℝ → ℝ) (q : C.Point) |
| 76 | (hf : MDifferentiableAt ((𝓡 n).prod 𝓘(ℝ, ℝ)) 𝓘(ℝ, ℝ) |
| 77 | f (q.1, (q.2 : ℝ))) : |
| 78 | mvfderiv (𝓡 (n + 1)) (fun r : C.Point => f (r.1, (r.2 : ℝ))) q |
| 79 | (C.timeVector q) = deriv (fun t => f (q.1, t)) q.2 := by |
| 80 | rw [C.mvfderiv_product_scalar f q hf] |
| 81 | simp [timeVector] |
| 82 | |
| 83 | end PoincareMT.M62.SpacetimeCharts |