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 | set_option autoImplicit false |
| 4 | set_option backward.isDefEq.respectTransparency false |
| 5 | |
| 6 | open scoped Manifold ContDiff Bundle |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | namespace Poincare.Manifold.VectorField |
| 11 | |
| 12 | universe u v |
| 13 | |
| 14 | variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 15 | {H : Type*} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} |
| 16 | {M : Type*} [TopologicalSpace M] [ChartedSpace H M] |
| 17 | [IsManifold I ∞ M] [I.Boundaryless] |
| 18 | |
| 19 | /-- Chart chain rule for a real-valued function read in the inverse chart. -/ |
| 20 | theorem fderiv_comp_extChartAt_symm {f : M → ℝ} {p : M} {z : E} |
| 21 | (hf : MDifferentiableAt I 𝓘(ℝ, ℝ) f ((extChartAt I p).symm z)) |
| 22 | (hz : z ∈ (extChartAt I p).target) (w : E) : |
| 23 | fderiv ℝ (f ∘ (extChartAt I p).symm) z w = |
| 24 | mfderiv I 𝓘(ℝ, ℝ) f ((extChartAt I p).symm z) |
| 25 | (mfderiv 𝓘(ℝ, E) I (extChartAt I p).symm z w) := by |
| 26 | have hsymm : MDifferentiableAt 𝓘(ℝ, E) I (extChartAt I p).symm z := by |
| 27 | have h := mdifferentiableWithinAt_extChartAt_symm (I := I) (x := p) hz |
| 28 | rwa [I.range_eq_univ, mdifferentiableWithinAt_univ] at h |
| 29 | have hcomp := mfderiv_comp z hf hsymm |
| 30 | rw [mfderiv_eq_fderiv] at hcomp |
| 31 | rw [hcomp] |
| 32 | rfl |
| 33 | |
| 34 | /-- The inverse chart differential is invertible on the chart target. -/ |
| 35 | theorem isInvertible_mfderiv_extChartAt_symm {p : M} {z : E} |
| 36 | (hz : z ∈ (extChartAt I p).target) : |
| 37 | (mfderiv 𝓘(ℝ, E) I (extChartAt I p).symm z).IsInvertible := by |
| 38 | have h := isInvertible_mfderivWithin_extChartAt_symm (I := I) (x := p) hz |
| 39 | rwa [I.range_eq_univ, mfderivWithin_univ] at h |
| 40 | |
| 41 | /-- Chart pullback converts a manifold directional derivative into an ordinary |
| 42 | derivative along the pulled-back vector field. -/ |
| 43 | theorem mfderiv_action_eq_fderiv_pullback {h : M → ℝ} {p : M} {z : E} |
| 44 | (hz : z ∈ (extChartAt I p).target) |
| 45 | (hh : MDifferentiableAt I 𝓘(ℝ, ℝ) h ((extChartAt I p).symm z)) |
| 46 | (Z : Π y : M, TangentSpace I y) : |
| 47 | fderiv ℝ (h ∘ (extChartAt I p).symm) z |
| 48 | (VectorField.mpullback 𝓘(ℝ, E) I (extChartAt I p).symm Z z) = |
| 49 | mfderiv I 𝓘(ℝ, ℝ) h ((extChartAt I p).symm z) |
| 50 | (Z ((extChartAt I p).symm z)) := by |
| 51 | rw [fderiv_comp_extChartAt_symm hh hz, VectorField.mpullback_apply, |
| 52 | (isInvertible_mfderiv_extChartAt_symm hz).self_apply_inverse] |
| 53 | |
| 54 | end Poincare.Manifold.VectorField |