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.Normed.Operator.BoundedLinearMaps |
| 2 | import Mathlib.Analysis.Normed.Module.FiniteDimension |
| 3 | |
| 4 | /-! |
| 5 | # Persistence of a noncritical differential |
| 6 | |
| 7 | Finite-dimensional bijectivity produces an actual continuous linear |
| 8 | equivalence. Openness of the range of such equivalences gives persistence |
| 9 | for a continuous family, with no determinant or varying basis. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Filter Set |
| 15 | open scoped Topology |
| 16 | |
| 17 | namespace PoincareMT.ReducedVolume |
| 18 | |
| 19 | variable {S X Y : Type*} [TopologicalSpace S] |
| 20 | [NormedAddCommGroup X] [NormedSpace ℝ X] [FiniteDimensional ℝ X] |
| 21 | [NormedAddCommGroup Y] [NormedSpace ℝ Y] |
| 22 | |
| 23 | /-- A continuous family near a finite-dimensional bijective linear map remains bijective. -/ |
| 24 | theorem eventually_bijective_of_continuousAt {D : S → X →L[ℝ] Y} {s₀ : S} |
| 25 | (hD : ContinuousAt D s₀) (h₀ : Function.Bijective (D s₀)) : |
| 26 | ∀ᶠ s in 𝓝 s₀, Function.Bijective (D s) := by |
| 27 | have hi : (D s₀).IsInvertible := |
| 28 | ⟨(LinearEquiv.ofBijective (D s₀).toLinearMap h₀).toContinuousLinearEquiv, rfl⟩ |
| 29 | have hopen : IsOpen {A : X →L[ℝ] Y | A.IsInvertible} := |
| 30 | ContinuousLinearEquiv.isOpen |
| 31 | filter_upwards [hD (hopen.mem_nhds hi)] with s hs |
| 32 | obtain ⟨e, he⟩ := hs |
| 33 | rw [← he] |
| 34 | exact e.bijective |
| 35 | |
| 36 | end PoincareMT.ReducedVolume |