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.Barrier.SmoothJoinAction |
| 2 | |
| 3 | /-! |
| 4 | # Minimal action compared with two meeting smooth curves |
| 5 | |
| 6 | The comparison follows from actual admissible smooth approximations with |
| 7 | arbitrarily small action error. The broken curve need not itself be smooth. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | set_option maxSynthPendingDepth 3 |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.ReducedLength |
| 18 | |
| 19 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 21 | |
| 22 | theorem minimizing_action_le_broken_square_action {J : Set ℝ} (F : RicciFlow n M J) |
| 23 | (hM04 : RicciFlowCurvatureTheory.{u}) (T τmax : ℝ) (hτmax : 0 < τmax) |
| 24 | (hwindow : Set.Icc (T - τmax) T ⊆ J) (b : ℝ) (hb : 0 < b) (hmax : b < τmax) |
| 25 | (P : BackwardTimePath F T 0 b) (hmin : IsMinimizingBackwardLPath F T 0 b P) |
| 26 | (α β : ℝ → M) (D : Set ℝ) (hD : IsOpen D) (hI : Set.Icc 0 (Real.sqrt b) ⊆ D) |
| 27 | (hα : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ α D) |
| 28 | (hβ : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ β D) |
| 29 | (c : ℝ) (hc : c ∈ Set.Ioo 0 (Real.sqrt b)) (heq : α c = β c) |
| 30 | (hleft : α 0 = P.curve 0) (hright : β (Real.sqrt b) = P.curve b) : |
| 31 | backwardLLength F T 0 b P.curve ≤ |
| 32 | (∫ s in 0..c, squareCurveActionDensity F T α s) + |
| 33 | ∫ s in c..Real.sqrt b, squareCurveActionDensity F T β s := by |
| 34 | by_contra h |
| 35 | let B := (∫ s in 0..c, squareCurveActionDensity F T α s) + |
| 36 | ∫ s in c..Real.sqrt b, squareCurveActionDensity F T β s |
| 37 | have hgap : 0 < (backwardLLength F T 0 b P.curve - B) / 2 := by |
| 38 | dsimp only [B] |
| 39 | linarith |
| 40 | obtain ⟨Q, hQ0, hQb, hQa⟩ := exists_backwardPath_smoothJoin_action_le F hM04 T τmax |
| 41 | hτmax hwindow b hb hmax α β D hD hI hα hβ c hc heq _ hgap |
| 42 | have hPQ := hmin Q (hQ0.trans hleft) (hQb.trans hright) |
| 43 | change backwardLLength F T 0 b Q.curve ≤ B + |
| 44 | (backwardLLength F T 0 b P.curve - B) / 2 at hQa |
| 45 | change ¬ backwardLLength F T 0 b P.curve ≤ B at h |
| 46 | linarith |
| 47 | |
| 48 | end PoincareMT.ReducedLength |