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.Analysis.ODE.ExistUnique |
| 2 | import Mathlib.Analysis.Calculus.ContDiff.RCLike |
| 3 | |
| 4 | /-! |
| 5 | # Local uniqueness from one smooth autonomous field germ |
| 6 | |
| 7 | The actual derivative identities give continuity at the initial time. |
| 8 | A single C1 germ supplies one Lipschitz neighborhood containing both |
| 9 | curves near that time, so the existing local ODE uniqueness theorem applies. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Filter |
| 15 | open scoped Topology |
| 16 | |
| 17 | namespace PoincareMT.ReducedVolume |
| 18 | |
| 19 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 20 | |
| 21 | /-- Two solutions through one state agree locally when the autonomous field is C1 there. -/ |
| 22 | theorem eventuallyEq_of_contDiffAt_vectorField {V : E → E} {f g : ℝ → E} {t₀ : ℝ} |
| 23 | (hV : ContDiffAt ℝ 1 V (f t₀)) |
| 24 | (hf : ∀ᶠ t in 𝓝 t₀, HasDerivAt f (V (f t)) t) |
| 25 | (hg : ∀ᶠ t in 𝓝 t₀, HasDerivAt g (V (g t)) t) |
| 26 | (heq : f t₀ = g t₀) : f =ᶠ[𝓝 t₀] g := by |
| 27 | obtain ⟨K, U, hU, hLip⟩ := hV.exists_lipschitzOnWith |
| 28 | have hfU : ∀ᶠ t in 𝓝 t₀, f t ∈ U := hf.self_of_nhds.continuousAt hU |
| 29 | have hgU : ∀ᶠ t in 𝓝 t₀, g t ∈ U := |
| 30 | hg.self_of_nhds.continuousAt (by simpa only [heq] using hU) |
| 31 | exact ODE_solution_unique_of_eventually (v := fun _ ↦ V) (s := fun _ ↦ U) |
| 32 | (Eventually.of_forall (fun _ ↦ hLip)) (hf.and hfU) (hg.and hgU) heq |
| 33 | |
| 34 | end PoincareMT.ReducedVolume |