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 PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Uniqueness.Closed |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.Analysis.Compact.EmbeddedRetraction |
| 3 | import Mathlib.Geometry.Manifold.WhitneyEmbedding |
| 4 | |
| 5 | /-! |
| 6 | # Actual compact closed and half-open uniqueness |
| 7 | |
| 8 | The compact ambient manifold supplies its own smooth embedding and |
| 9 | retraction. Actual fixed-label closed uniqueness then gives the two |
| 10 | frozen uniqueness fields without an existence premise. MT2007 |
| 11 | Claim 19.1, p. 437; |
| 12 | `2026-09-22-uniqueness-compact-field-adapters.md`. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M63 |
| 23 | |
| 24 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] [T2Space M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 26 | {a b : ℝ} |
| 27 | |
| 28 | /-- Any two actual C2 normal solutions in the compact ambient manifold |
| 29 | with equal initial labels agree on their full closed time interval. |
| 30 | MT2007 Claim 19.1, p. 437; compact uniqueness adapters, statement 1. |
| 31 | The interval may be empty or a singleton. -/ |
| 32 | theorem c2ShrinkingCurve_unique_closed (F : RicciFlow n M (Icc a b)) |
| 33 | (hcompact : IsCompact (univ : Set M)) |
| 34 | {s T : ℝ} {c d : ℝ → ℝ → M} |
| 35 | (hc : M63C2ShrinkingCurveOn F c (Icc s T)) |
| 36 | (hd : M63C2ShrinkingCurveOn F d (Icc s T)) |
| 37 | (hinit : ∀ x, c x s = d x s) : |
| 38 | ∀ t ∈ Icc s T, ∀ x, c x t = d x t := by |
| 39 | let : CompactSpace M := isCompact_univ_iff.mp hcompact |
| 40 | let : Nonempty M := ⟨c 0 s⟩ |
| 41 | obtain ⟨N, e, he, hemb, hinj⟩ := exists_embedding_euclidean_of_compact (I := 𝓡 n) (M := M) |
| 42 | obtain ⟨U, ρ, hU, heU, hρ, hρe, _hmin, _huniq⟩ := |
| 43 | exists_smooth_compact_embedded_retraction e hemb he hinj |
| 44 | exact c2ShrinkingCurve_unique_closed_of_retraction he hU heU hρ hρe hc hd hinit |
| 45 | |
| 46 | /-- The actual compact closed theorem supplies uniqueness at every |
| 47 | included half-open time by restriction to a shorter closed interval. |
| 48 | MT2007 Claim 19.1, p. 437; compact uniqueness adapters, statement 2. |
| 49 | No trace or time derivative is asserted at the omitted endpoint. -/ |
| 50 | theorem c2ShrinkingCurve_unique_half_open (F : RicciFlow n M (Icc a b)) |
| 51 | (hcompact : IsCompact (univ : Set M)) |
| 52 | {T : ℝ} (haT : a < T) (hTb : T ≤ b) |
| 53 | {c d : ℝ → ℝ → M} |
| 54 | (hc : M63C2ShrinkingCurveOn F c (Ico a T)) |
| 55 | (hd : M63C2ShrinkingCurveOn F d (Ico a T)) |
| 56 | (hinit : ∀ x, c x a = d x a) : |
| 57 | ∀ t ∈ Ico a T, ∀ x, c x t = d x t := by |
| 58 | exact unique_half_open_of_unique_closed |
| 59 | (fun _ _ _ _ _ hc hd hinit => c2ShrinkingCurve_unique_closed F hcompact hc hd hinit) |
| 60 | haT hTb hc hd hinit |
| 61 | |
| 62 | end PoincareMT.M63 |