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 Mathlib.Geometry.Manifold.VectorField.LieBracket |
| 2 | |
| 3 | /-! |
| 4 | # Scalar derivatives of vector fields in actual extended charts |
| 5 | -/ |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | set_option backward.isDefEq.respectTransparency false |
| 9 | |
| 10 | open Set Function |
| 11 | open scoped Manifold ContDiff Topology |
| 12 | |
| 13 | namespace Poincare.Spacetime.Realization |
| 14 | |
| 15 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 16 | {H : Type*} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} |
| 17 | {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I ∞ M] |
| 18 | |
| 19 | theorem extChart_scalar_action (x : M) {y : E} (hy : y ∈ (extChartAt I x).target) |
| 20 | {f : M → ℝ} (hf : MDifferentiableAt I 𝓘(ℝ) f ((extChartAt I x).symm y)) |
| 21 | (V : ∀ p : M, TangentSpace I p) : |
| 22 | fderivWithin ℝ (f ∘ (extChartAt I x).symm) (range I) y |
| 23 | (VectorField.mpullbackWithin 𝓘(ℝ, E) I (extChartAt I x).symm V (range I) y) = |
| 24 | mfderiv I 𝓘(ℝ) f ((extChartAt I x).symm y) (V ((extChartAt I x).symm y)) := by |
| 25 | have hc := mfderiv_comp_mfderivWithin y hf |
| 26 | (mdifferentiableWithinAt_extChartAt_symm hy) |
| 27 | (I.uniqueMDiffOn y (extChartAt_target_subset_range x hy)) |
| 28 | rw [mfderivWithin_eq_fderivWithin] at hc |
| 29 | rw [hc, VectorField.mpullbackWithin_apply] |
| 30 | change mfderiv I 𝓘(ℝ) f ((extChartAt I x).symm y) |
| 31 | (mfderivWithin 𝓘(ℝ, E) I (extChartAt I x).symm (range I) y |
| 32 | ((mfderivWithin 𝓘(ℝ, E) I (extChartAt I x).symm (range I) y).inverse |
| 33 | (V ((extChartAt I x).symm y)))) = _ |
| 34 | exact congrArg (mfderiv I 𝓘(ℝ) f ((extChartAt I x).symm y)) |
| 35 | ((isInvertible_mfderivWithin_extChartAt_symm hy).self_apply_inverse _) |
| 36 | |
| 37 | omit [IsManifold I ∞ M] in |
| 38 | theorem extChart_scalar_derivative (x : M) {f : M → ℝ} |
| 39 | (hf : MDifferentiableAt I 𝓘(ℝ) f x) (v : TangentSpace I x) : |
| 40 | mfderiv I 𝓘(ℝ) f x v = |
| 41 | fderivWithin ℝ (f ∘ (extChartAt I x).symm) (range I) (extChartAt I x x) v := by |
| 42 | rw [hf.mfderiv] |
| 43 | rfl |
| 44 | |
| 45 | end Poincare.Spacetime.Realization |