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.Generalized.ReducedGeometry.SmallTime.Coordinates.SmallTimeGaugeComparison |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential |
| 3 | |
| 4 | /-! |
| 5 | # From low-action comparison to genuine unique minimizing branches |
| 6 | |
| 7 | Morgan-Tian Corollary 6.79, pp. 144-145. It suffices to compare |
| 8 | competitors whose action is at most the selected path's action. |
| 9 | This gives global minimality and uniqueness without any prior |
| 10 | attainment assumption. Coherence then supplies the exact frozen |
| 11 | unique-minimizing-branch predicate for the exponential family. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T τ₁ τ₂ : ℝ} {x y : G.Point} |
| 25 | |
| 26 | /-- Comparison against every low-action competitor proves genuine |
| 27 | global minimality and uniqueness, the confinement implication in |
| 28 | Corollary 6.79, pp. 144-145. -/ |
| 29 | theorem minimizing_and_unique_of_lowAction_comparison |
| 30 | (p : M14BackwardPath G T τ₁ τ₂ x y) |
| 31 | (hcompare : ∀ q : M14BackwardPath G T τ₁ τ₂ x y, |
| 32 | M14BackwardLAction G q ≤ M14BackwardLAction G p → |
| 33 | M14BackwardLAction G p ≤ M14BackwardLAction G q ∧ EqOn q.curve p.curve (Icc τ₁ τ₂)) : |
| 34 | M14IsMinimizing p ∧ ∀ q : M14BackwardPath G T τ₁ τ₂ x y, |
| 35 | M14IsMinimizing q → EqOn q.curve p.curve (Icc τ₁ τ₂) := by |
| 36 | refine ⟨fun q => ?_, fun q hq => (hcompare q (hq p)).2⟩ |
| 37 | exact (le_total (M14BackwardLAction G p) (M14BackwardLAction G q)).elim id |
| 38 | (fun hq => (hcompare q hq).1) |
| 39 | |
| 40 | /-- Genuine minimality and uniqueness of a supplied selected path |
| 41 | give the exact frozen branch predicate, Corollary 6.79, pp. 144-145. -/ |
| 42 | theorem uniqueMinimizingBranch_of_selected_path |
| 43 | (E : M14ExponentialFamily G T x) (Z : G.Horizontal x) {s : ℝ} |
| 44 | (hs : (Z, s) ∈ E.domain) (hpos : 0 < s) |
| 45 | (hmin : M14IsMinimizing (E.path Z s hs hpos)) |
| 46 | (hunique : ∀ q : M14BackwardPath G T 0 (s ^ 2) x (E.gamma Z s), |
| 47 | M14IsMinimizing q → EqOn q.curve (E.path Z s hs hpos).curve (Icc 0 (s ^ 2))) : |
| 48 | M14UniqueMinimizingBranch G T (s ^ 2) x E Z := by |
| 49 | unfold M14UniqueMinimizingBranch |
| 50 | rw [Real.sqrt_sq hpos.le] |
| 51 | exact ⟨hs, E.path Z s hs hpos, E.path_coherent Z s hs hpos, hmin, hunique⟩ |
| 52 | |
| 53 | end PoincareMT.M14 |