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.LGeometry.Basic |
| 2 | import Mathlib.Geometry.Manifold.MFDeriv.SpecificFunctions |
| 3 | |
| 4 | /-! # Invariance of L-length under equality on the geometric interval -/ |
| 5 | |
| 6 | set_option autoImplicit false |
| 7 | set_option backward.isDefEq.respectTransparency false |
| 8 | |
| 9 | open Set Filter |
| 10 | open scoped Manifold Topology ContDiff |
| 11 | |
| 12 | universe u |
| 13 | |
| 14 | namespace PoincareMT |
| 15 | |
| 16 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 17 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 18 | {J : Set ℝ} {F : RicciFlow n M J} {T a b : ℝ} |
| 19 | |
| 20 | theorem backwardLLength_eq_of_eqOn {γ η : ℝ → M} (hab : a ≤ b) |
| 21 | (h : EqOn γ η (Icc a b)) : backwardLLength F T a b γ = backwardLLength F T a b η := by |
| 22 | apply intervalIntegral.integral_congr_uIoo |
| 23 | rw [uIoo_of_le hab] |
| 24 | intro s hs |
| 25 | have heq : γ =ᶠ[𝓝 s] η := Filter.mem_of_superset (Ioo_mem_nhds hs.1 hs.2) |
| 26 | (fun t ht => h (Ioo_subset_Icc_self ht)) |
| 27 | have hd := heq.mfderiv_eq (I := 𝓘(ℝ, ℝ)) (I' := 𝓡 n) |
| 28 | simp only [backwardLIntegrand, curveVelocity, hd, heq.eq_of_nhds] |
| 29 | congr 2 |
| 30 | exact congrArg (fun x => (F.metric (T - s)).inner x |
| 31 | (mfderiv (𝓘(ℝ, ℝ)) (𝓡 n) η s 1) (mfderiv (𝓘(ℝ, ℝ)) (𝓡 n) η s 1)) |
| 32 | heq.eq_of_nhds |
| 33 | |
| 34 | theorem IsMinimizingBackwardLPath.congr {γ η : BackwardTimePath F T a b} |
| 35 | (hmin : IsMinimizingBackwardLPath F T a b γ) |
| 36 | (h : EqOn γ.curve η.curve (Icc a b)) : IsMinimizingBackwardLPath F T a b η := by |
| 37 | have hab := γ.ordered.le |
| 38 | intro q hq0 hq1 |
| 39 | rw [← backwardLLength_eq_of_eqOn hab h] |
| 40 | exact hmin q (hq0.trans (h ⟨le_rfl, hab⟩).symm) |
| 41 | (hq1.trans (h ⟨hab, le_rfl⟩).symm) |
| 42 | |
| 43 | end PoincareMT |