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.EndpointComparisonAction |
| 2 | import Mathlib.Topology.Order.Compact |
| 3 | |
| 4 | /-! |
| 5 | # Uniform action bounds on compact endpoint sets |
| 6 | |
| 7 | The genuine smooth comparison paths bound every minimizing path locally. |
| 8 | A finite subcover gives one bound without assuming reduced-length continuity. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | set_option maxSynthPendingDepth 3 |
| 13 | |
| 14 | open scoped Manifold ContDiff Bundle Topology BigOperators |
| 15 | open Filter |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.ReducedLength |
| 20 | |
| 21 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 23 | [IsManifold (𝓡 n) ∞ M] [ConnectedSpace M] |
| 24 | |
| 25 | theorem exists_local_minimizing_action_bound {J : Set ℝ} |
| 26 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 27 | (T τmax : ℝ) (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 28 | (hL : LGeodesicTheory F T τmax) (p : M) (z : M × ℝ) |
| 29 | (hz : z.2 ∈ Set.Ioo 0 τmax) : |
| 30 | ∃ (N : Set (M × ℝ)) (D : ℝ), IsOpen N ∧ z ∈ N ∧ |
| 31 | ∀ w ∈ N, ∀ P : BackwardTimePath F T 0 w.2, |
| 32 | P.curve 0 = p → P.curve w.2 = w.1 → |
| 33 | IsMinimizingBackwardLPath F T 0 w.2 P → backwardLLength F T 0 w.2 P.curve ≤ D := by |
| 34 | obtain ⟨U, hU, hzU, _, B, hB, _, hpaths⟩ := |
| 35 | exists_local_smooth_comparison_action F hM04 T τmax hτmax hwindow hL p z.1 z.2 hz.1 hz.2 |
| 36 | have hc : ContinuousAt B z := hB.continuousOn.continuousAt (hU.mem_nhds hzU) |
| 37 | have hnear : {w | B w < B z + 1} ∈ 𝓝 z := hc.eventually_lt_const (lt_add_one _) |
| 38 | obtain ⟨N, hNsub, hN, hzN⟩ := mem_nhds_iff.mp (inter_mem (hU.mem_nhds hzU) hnear) |
| 39 | refine ⟨N, B z + 1, hN, hzN, ?_⟩ |
| 40 | intro w hw P hP0 hPw hPmin |
| 41 | obtain ⟨Q, hQ0, hQw, hQ⟩ := hpaths w (hNsub hw).1 |
| 42 | have hle := hPmin Q (hQ0.trans hP0.symm) (hQw.trans hPw.symm) |
| 43 | rw [hQ] at hle |
| 44 | exact hle.trans (hNsub hw).2.le |
| 45 | |
| 46 | theorem exists_compact_minimizing_action_bound {J : Set ℝ} |
| 47 | (F : RicciFlow n M J) (hM04 : RicciFlowCurvatureTheory.{u}) |
| 48 | (T τmax : ℝ) (hτmax : 0 < τmax) (hwindow : Set.Icc (T - τmax) T ⊆ J) |
| 49 | (hL : LGeodesicTheory F T τmax) (p : M) |
| 50 | (Q : Set (M × ℝ)) (hQ : IsCompact Q) (hQt : Q ⊆ Set.univ ×ˢ Set.Ioo 0 τmax) : |
| 51 | ∃ D : ℝ, 0 ≤ D ∧ ∀ w ∈ Q, ∀ P : BackwardTimePath F T 0 w.2, |
| 52 | P.curve 0 = p → P.curve w.2 = w.1 → |
| 53 | IsMinimizingBackwardLPath F T 0 w.2 P → backwardLLength F T 0 w.2 P.curve ≤ D := by |
| 54 | classical |
| 55 | have hloc (z : Q) := exists_local_minimizing_action_bound F hM04 T τmax hτmax hwindow |
| 56 | hL p z.1 (hQt z.2).2 |
| 57 | choose N D hN hzN hbound using hloc |
| 58 | obtain ⟨s, hs⟩ := hQ.elim_finite_subcover N hN (by |
| 59 | intro z hz |
| 60 | exact Set.mem_iUnion.mpr ⟨⟨z, hz⟩, hzN ⟨z, hz⟩⟩) |
| 61 | refine ⟨∑ z ∈ s, |D z|, Finset.sum_nonneg (fun z _ ↦ abs_nonneg (D z)), ?_⟩ |
| 62 | intro w hw P hP0 hPw hPmin |
| 63 | obtain ⟨z, hzs, hz⟩ := Set.mem_iUnion₂.mp (hs hw) |
| 64 | exact (hbound z w hz P hP0 hPw hPmin).trans ((le_abs_self (D z)).trans |
| 65 | (Finset.single_le_sum (fun i _ ↦ abs_nonneg (D i)) hzs)) |
| 66 | |
| 67 | end PoincareMT.ReducedLength |