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.Analysis.Parabolic.Interior.CompactSlices |
| 2 | import Mathlib.Analysis.Calculus.ContDiff.Operations |
| 3 | |
| 4 | /-! |
| 5 | # Time translation of smooth space-time functions |
| 6 | |
| 7 | Translation in time preserves compact support, smoothness, and all spatial |
| 8 | jets, allowing an interior time cylinder to be placed at an initial time zero. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxSynthPendingDepth 3 |
| 13 | |
| 14 | open scoped ContDiff |
| 15 | |
| 16 | namespace Poincare.Parabolic.Interior |
| 17 | |
| 18 | variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 19 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 20 | |
| 21 | /-- Shift time by a constant, leaving spatial coordinates fixed. -/ |
| 22 | def timeTranslate (c : ℝ) (f : E × ℝ → F) (p : E × ℝ) : F := |
| 23 | f (p.1, p.2 + c) |
| 24 | |
| 25 | theorem contDiff_timeTranslate (c : ℝ) {f : E × ℝ → F} |
| 26 | (hf : ContDiff ℝ ∞ f) : ContDiff ℝ ∞ (timeTranslate c f) := |
| 27 | hf.comp (contDiff_fst.prodMk (contDiff_snd.add contDiff_const)) |
| 28 | |
| 29 | omit [NormedSpace ℝ E] [NormedSpace ℝ F] in |
| 30 | theorem hasCompactSupport_timeTranslate (c : ℝ) {f : E × ℝ → F} |
| 31 | (hf : HasCompactSupport f) : HasCompactSupport (timeTranslate c f) := by |
| 32 | have h := hf.comp_isClosedEmbedding (Homeomorph.addRight ((0 : E), c)).isClosedEmbedding |
| 33 | convert h using 1 |
| 34 | funext p |
| 35 | change f (p.1, p.2 + c) = f (p.1 + 0, p.2 + c) |
| 36 | rw [add_zero] |
| 37 | |
| 38 | theorem timeDerivative_timeTranslate (c : ℝ) {f : E × ℝ → F} |
| 39 | (hf : ContDiff ℝ ∞ f) (p : E × ℝ) : |
| 40 | timeDerivative (timeTranslate c f) p = timeDerivative f (p.1, p.2 + c) := by |
| 41 | have h := (hasDerivAt_timeSlice (hf.differentiable (by simp)) p.1 (p.2 + c)).scomp p.2 |
| 42 | ((hasDerivAt_id p.2).add_const c) |
| 43 | have h' := hasDerivAt_timeSlice ((contDiff_timeTranslate c hf).differentiable (by simp)) |
| 44 | p.1 p.2 |
| 45 | exact h'.unique (by simpa [timeTranslate, Function.comp_def] using h) |
| 46 | |
| 47 | theorem spatialDerivative_timeTranslate (c : ℝ) {f : E × ℝ → F} |
| 48 | (hf : ContDiff ℝ ∞ f) (p : E × ℝ) : |
| 49 | spatialDerivative (timeTranslate c f) p = spatialDerivative f (p.1, p.2 + c) := by |
| 50 | rw [← fderiv_spatialSlice (contDiff_timeTranslate c hf) p.1 p.2, |
| 51 | ← fderiv_spatialSlice hf p.1 (p.2 + c)] |
| 52 | rfl |
| 53 | |
| 54 | theorem spatialDerivative_spatialDerivative_timeTranslate (c : ℝ) |
| 55 | {f : E × ℝ → F} (hf : ContDiff ℝ ∞ f) (p : E × ℝ) : |
| 56 | spatialDerivative (spatialDerivative (timeTranslate c f)) p = |
| 57 | spatialDerivative (spatialDerivative f) (p.1, p.2 + c) := by |
| 58 | have h : spatialDerivative (timeTranslate c f) = timeTranslate c (spatialDerivative f) := |
| 59 | funext (spatialDerivative_timeTranslate c hf) |
| 60 | rw [h, spatialDerivative_timeTranslate c (contDiff_spatialDerivative hf)] |
| 61 | |
| 62 | theorem fderiv_fderiv_timeTranslate_slice (c : ℝ) (f : E × ℝ → F) (x : E) (t : ℝ) : |
| 63 | fderiv ℝ (fun y => fderiv ℝ (fun z => timeTranslate c f (z, t)) y) x = |
| 64 | fderiv ℝ (fun y => fderiv ℝ (fun z => f (z, t + c)) y) x := rfl |
| 65 | |
| 66 | end Poincare.Parabolic.Interior |