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.RicciFlow.Basic |
| 2 | import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace |
| 3 | |
| 4 | /-! |
| 5 | # Actual translation to a nondegenerate time interval |
| 6 | |
| 7 | The translated metric and connection obey the original flow equation on |
| 8 | the translated closed interval, including its within-domain endpoints. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.ReducedLength |
| 18 | |
| 19 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 21 | [IsManifold (𝓡 n) ∞ M] |
| 22 | |
| 23 | noncomputable def timeTranslatedFlow {J : Set ℝ} (F : RicciFlow n M J) |
| 24 | (a L : ℝ) (hL : 0 < L) |
| 25 | (hwindow : ∀ t ∈ Set.Icc 0 L, a + t ∈ J) : RicciFlow n M (Set.Icc 0 L) where |
| 26 | metric t := F.metric (a + t) |
| 27 | connection t := F.connection (a + t) |
| 28 | interval := Set.ordConnected_Icc |
| 29 | nontrivial := ⟨0, ⟨le_rfl, hL.le⟩, L, ⟨hL.le, le_rfl⟩, ne_of_lt hL⟩ |
| 30 | smooth := by |
| 31 | have ht : ContMDiff ((𝓘(ℝ, ℝ)).prod (𝓡 n)) ((𝓘(ℝ, ℝ)).prod (𝓡 n)) ∞ |
| 32 | (fun z : ℝ × M ↦ (a + z.1, z.2)) := |
| 33 | (((contDiff_const.add contDiff_id).contMDiff).comp contMDiff_fst).prodMk contMDiff_snd |
| 34 | exact F.smooth.comp ht.contMDiffOn (fun z hz ↦ ⟨hwindow z.1 hz.1, Set.mem_univ _⟩) |
| 35 | equation t ht x v w := by |
| 36 | have hshift : HasDerivWithinAt (fun s : ℝ ↦ a + s) 1 (Set.Icc 0 L) t := |
| 37 | ((hasDerivAt_id t).const_add a).hasDerivWithinAt |
| 38 | simpa only [Function.comp_def, mul_one] using |
| 39 | (F.equation (a + t) (hwindow t ht) x v w).comp t hshift hwindow |
| 40 | |
| 41 | end PoincareMT.ReducedLength |