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.ReducedGeometry.ReducedLength.Action.ExponentialAction |
| 2 | import Mathlib.Geometry.Manifold.Algebra.LieGroup |
| 3 | |
| 4 | /-! # Smoothness of the exact normalized inverse-branch action -/ |
| 5 | |
| 6 | set_option autoImplicit false |
| 7 | set_option maxSynthPendingDepth 3 |
| 8 | |
| 9 | open scoped Manifold ContDiff Bundle |
| 10 | |
| 11 | universe u |
| 12 | |
| 13 | namespace PoincareMT.ReducedLength |
| 14 | |
| 15 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 16 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 17 | [IsManifold (𝓡 n) ∞ M] |
| 18 | |
| 19 | set_option backward.isDefEq.respectTransparency false in |
| 20 | theorem lExponentialFamily_regular_representative_smooth {J : Set ℝ} {F : RicciFlow n M J} |
| 21 | (hM04 : RicciFlowCurvatureTheory.{u}) {T τmax : ℝ} |
| 22 | (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 23 | {p : M} (A : LExponentialFamily F T τmax p) |
| 24 | (G : OpenPartialHomeomorph (TangentSpace (𝓡 n) p × ℝ) (M × ℝ)) |
| 25 | (htarget : G.target ⊆ Set.univ ×ˢ Set.Ioo 0 τmax) |
| 26 | (hinv : letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 27 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 28 | ContMDiffOn ((𝓡 n).prod (𝓘(ℝ, ℝ))) |
| 29 | ((𝓘(ℝ, TangentSpace (𝓡 n) p)).prod (𝓘(ℝ, ℝ))) ∞ G.symm G.target) : |
| 30 | ContMDiffOn ((𝓡 n).prod (𝓘(ℝ, ℝ))) (𝓘(ℝ, ℝ)) ∞ |
| 31 | (fun w ↦ A.action (G.symm w).1 w.2 / (2 * Real.sqrt w.2)) G.target := by |
| 32 | letI : Bundle.RiemannianBundle (TangentSpace (𝓡 n) : M → Type _) := |
| 33 | ⟨(F.metric T).toRiemannianMetric⟩ |
| 34 | intro w hw |
| 35 | have ht := (htarget hw).2 |
| 36 | have haction : ContDiffAt ℝ ∞ |
| 37 | (fun v : TangentSpace (𝓡 n) p × ℝ ↦ A.action v.1 v.2) ((G.symm w).1, w.2) := |
| 38 | (lExponentialFamily_action_contDiffOn hM04 hτmax hwindow A).contDiffAt |
| 39 | ((isOpen_univ.prod isOpen_Ioo).mem_nhds ⟨Set.mem_univ _, ht⟩) |
| 40 | have hmap : ContMDiffAt ((𝓡 n).prod (𝓘(ℝ, ℝ))) |
| 41 | (𝓘(ℝ, TangentSpace (𝓡 n) p × ℝ)) ∞ |
| 42 | (fun z : M × ℝ ↦ ((G.symm z).1, z.2)) w := by |
| 43 | convert! (hinv.contMDiffAt (G.open_target.mem_nhds hw)).fst.prodMk contMDiffAt_snd using 1 <;> |
| 44 | simp only [modelWithCornersSelf_prod, chartedSpaceSelf_prod] |
| 45 | have hnum := haction.contMDiffAt.comp w hmap |
| 46 | have hroot : ContMDiffAt ((𝓡 n).prod (𝓘(ℝ, ℝ))) (𝓘(ℝ, ℝ)) ∞ |
| 47 | (fun z : M × ℝ ↦ Real.sqrt z.2) w := |
| 48 | (Real.contDiffAt_sqrt ht.1.ne').contMDiffAt.comp w contMDiffAt_snd |
| 49 | exact (hnum.div₀ (contMDiffAt_const.mul hroot) |
| 50 | (mul_ne_zero two_ne_zero (Real.sqrt_pos.mpr ht.1).ne')).contMDiffWithinAt |
| 51 | |
| 52 | end PoincareMT.ReducedLength |