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.ContMDiffMFDeriv |
| 2 | import Mathlib.Geometry.Manifold.Instances.Real |
| 3 | |
| 4 | /-! # Smooth velocity lifts of curves -/ |
| 5 | |
| 6 | set_option autoImplicit false |
| 7 | set_option backward.isDefEq.respectTransparency false |
| 8 | |
| 9 | open Set Bundle |
| 10 | open scoped Manifold ContDiff |
| 11 | |
| 12 | universe u |
| 13 | |
| 14 | namespace Poincare.Manifold |
| 15 | |
| 16 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 17 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 18 | |
| 19 | /-- The velocity of a smooth curve on an open domain is a smooth tangent-bundle lift. -/ |
| 20 | theorem contMDiffOn_velocity_lift {γ : ℝ → M} {I : Set ℝ} |
| 21 | (hI : IsOpen I) (hγ : ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 n) ∞ γ I) : |
| 22 | ContMDiffOn 𝓘(ℝ, ℝ) ((𝓡 n).prod (𝓡 n)) ∞ |
| 23 | (fun u => (⟨γ u, mfderiv 𝓘(ℝ, ℝ) (𝓡 n) γ u (1 : ℝ)⟩ : |
| 24 | TotalSpace (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓡 n)))) I := by |
| 25 | have hunit : ContMDiff 𝓘(ℝ, ℝ) (𝓘(ℝ, ℝ).prod 𝓘(ℝ, ℝ)) ∞ |
| 26 | (fun u : ℝ => (⟨u, (1 : ℝ)⟩ : TangentBundle 𝓘(ℝ, ℝ) ℝ)) := by |
| 27 | intro u |
| 28 | apply contMDiffAt_totalSpace.mpr |
| 29 | refine ⟨contMDiffAt_id, ?_⟩ |
| 30 | simpa only [trivializationAt_model_space_apply] using |
| 31 | (contMDiffAt_const (I := 𝓘(ℝ, ℝ)) (I' := 𝓘(ℝ, ℝ)) |
| 32 | (n := ∞) (x := u) (c := (1 : ℝ))) |
| 33 | have h := (hγ.contMDiffOn_tangentMapWithin (m := ∞) (by simp) |
| 34 | hI.uniqueMDiffOn).comp hunit.contMDiffOn (fun u hu => hu) |
| 35 | apply h.congr |
| 36 | intro u hu |
| 37 | simp only [Function.comp_def, tangentMapWithin] |
| 38 | rw [mfderivWithin_of_mem_nhds (hI.mem_nhds hu)] |
| 39 | |
| 40 | end Poincare.Manifold |