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.LocalDiffeomorph |
| 2 | import Mathlib.Geometry.Manifold.MFDeriv.FDeriv |
| 3 | |
| 4 | /-! |
| 5 | # Translation and recentering of partial diffeomorphisms |
| 6 | |
| 7 | Translation in a normed model space has identity differential and gives |
| 8 | recentered source coordinates of any differentiability order. |
| 9 | Application: Morgan-Tian Proposition 12.13, pp. 304-306. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff |
| 16 | |
| 17 | namespace PoincareMT.M34 |
| 18 | |
| 19 | variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] |
| 20 | {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] |
| 21 | |
| 22 | /-- Addition by a fixed vector as a diffeomorphism, of any smoothness |
| 23 | order (used in Proposition 12.13, pp. 304-306). -/ |
| 24 | noncomputable def modelTranslationDiffeomorph (x : E) (m : ℕ∞ω := ∞) : |
| 25 | Diffeomorph (𝓘(𝕜, E)) (𝓘(𝕜, E)) E E m where |
| 26 | toEquiv := (Homeomorph.addLeft x).toEquiv |
| 27 | contMDiff_toFun := (contDiff_const.add contDiff_id).contMDiff |
| 28 | contMDiff_invFun := (contDiff_const.add contDiff_id).contMDiff |
| 29 | |
| 30 | set_option backward.isDefEq.respectTransparency false in |
| 31 | /-- Translation has the identity manifold derivative, regardless of the |
| 32 | recorded smoothness order (Proposition 12.13, pp. 304-306). -/ |
| 33 | theorem modelTranslationDiffeomorph_mfderiv (x z : E) (m : ℕ∞ω := ∞) : |
| 34 | mfderiv (𝓘(𝕜, E)) (𝓘(𝕜, E)) (modelTranslationDiffeomorph (𝕜 := 𝕜) x m) z = |
| 35 | ContinuousLinearMap.id 𝕜 E := by |
| 36 | have hd : HasFDerivAt (fun y : E => x + y) (ContinuousLinearMap.id 𝕜 E) z := |
| 37 | (hasFDerivAt_id z).const_add x |
| 38 | apply ContinuousLinearMap.ext |
| 39 | intro v |
| 40 | change mfderiv (𝓘(𝕜, E)) (𝓘(𝕜, E)) (fun y => x + y) z v = v |
| 41 | rw [mfderiv_eq_fderiv] |
| 42 | convert! congrArg (fun L : E →L[𝕜] E => L v) hd.fderiv using 1 |
| 43 | |
| 44 | variable {E' : Type*} [NormedAddCommGroup E'] [NormedSpace 𝕜 E'] |
| 45 | {H : Type*} [TopologicalSpace H] {I : ModelWithCorners 𝕜 E' H} |
| 46 | {M : Type*} [TopologicalSpace M] [ChartedSpace H M] {m : ℕ∞ω} |
| 47 | |
| 48 | /-- Recenter the normed source of any partial diffeomorphism by a |
| 49 | translation (Proposition 12.13, pp. 304-306). -/ |
| 50 | noncomputable def centeredDiffeomorph (e : PartialDiffeomorph (𝓘(𝕜, E)) I E M m) |
| 51 | (x : E) : PartialDiffeomorph (𝓘(𝕜, E)) I E M m := |
| 52 | (modelTranslationDiffeomorph (𝕜 := 𝕜) x m).toPartialDiffeomorph.trans e |
| 53 | |
| 54 | /-- The recentered source is exactly the translated original source |
| 55 | (Proposition 12.13, pp. 304-306). -/ |
| 56 | theorem centeredDiffeomorph_mem_source (e : PartialDiffeomorph (𝓘(𝕜, E)) I E M m) |
| 57 | (x z : E) : z ∈ (centeredDiffeomorph e x).source ↔ x + z ∈ e.source := by |
| 58 | change z ∈ (univ : Set E) ∩ (fun y => x + y) ⁻¹' e.source ↔ _ |
| 59 | simp |
| 60 | |
| 61 | end PoincareMT.M34 |