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.Exponential.Stability.PrefixNonconjugacy |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Minimizing.ExponentialPrefix |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Stability.StableDomain |
| 4 | |
| 5 | /-! |
| 6 | # Stability of every strict positive prefix |
| 7 | |
| 8 | Morgan-Tian Proposition 6.30, pp. 118-119. Actual nonconjugacy |
| 9 | combines with uniqueness against all admissible competitors. The |
| 10 | full branch's open unique-minimizer neighborhood remains a valid |
| 11 | unique-minimizer neighborhood at every strict positive prefix. |
| 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 : G.Point} |
| 25 | |
| 26 | /-- The supplied exponential path is itself minimizing when its |
| 27 | actual branch is uniquely minimizing, Proposition 6.30, pp. 118-119. -/ |
| 28 | theorem exponentialPath_minimizing_of_uniqueBranch (E : M14ExponentialFamily G T x) |
| 29 | {Z : G.Horizontal x} {b : ℝ} (hb : 0 < b) (hZ : (Z, b) ∈ E.domain) |
| 30 | (hbranch : M14UniqueMinimizingBranch G T (b ^ 2) x E Z) : |
| 31 | M14IsMinimizing (E.path Z b hZ hb) := by |
| 32 | unfold M14UniqueMinimizingBranch at hbranch |
| 33 | rw [Real.sqrt_sq hb.le] at hbranch |
| 34 | obtain ⟨_, q, hcurve, hmin, _⟩ := hbranch |
| 35 | apply (isMinimizing_iff_of_curve_eqOn (E.path Z b hZ hb) q ?_).mpr hmin |
| 36 | intro t ht |
| 37 | exact (E.path_coherent Z b hZ hb t (Ioo_subset_Icc_self ht)).trans |
| 38 | (hcurve (Ioo_subset_Icc_self ht)).symm |
| 39 | |
| 40 | /-- Every stable branch remains stable at every strict positive |
| 41 | prefix, with the original open unique-minimizer neighborhood, |
| 42 | Proposition 6.30, pp. 118-119. -/ |
| 43 | theorem stableInitialVector_prefix |
| 44 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 45 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 46 | (E : M14ExponentialFamily G T x) {τ₀ τ : ℝ} {Z : G.Horizontal x} |
| 47 | (hτ : 0 < τ) (hlt : τ < τ₀) (hstable : M14StableInitialVector G T τ₀ x E Z) : |
| 48 | M14StableInitialVector G T τ x E Z := by |
| 49 | obtain ⟨hZ₀, _, U, hU, hZU, hbranch⟩ := hstable |
| 50 | have hτ₀ : 0 < τ₀ := hτ.trans hlt |
| 51 | have hZ : (Z, Real.sqrt τ) ∈ E.domain := |
| 52 | (E.maximal_lifetime Z).out (E.domain_zero Z) hZ₀ |
| 53 | ⟨Real.sqrt_nonneg τ, Real.sqrt_le_sqrt hlt.le⟩ |
| 54 | have hc : Real.sqrt τ ∈ Ioo 0 (Real.sqrt τ₀) := |
| 55 | ⟨Real.sqrt_pos.mpr hτ, Real.sqrt_lt_sqrt hτ.le hlt⟩ |
| 56 | have hfull : M14UniqueMinimizingBranch G T ((Real.sqrt τ₀) ^ 2) x E Z := by |
| 57 | simpa only [Real.sq_sqrt hτ₀.le] using hbranch Z hZU |
| 58 | have hmin := exponentialPath_minimizing_of_uniqueBranch E (Real.sqrt_pos.mpr hτ₀) hZ₀ hfull |
| 59 | refine ⟨hZ, exponential_prefix_differential_bijective hCoordinates hM04 hM12 E Z hZ₀ hc hmin hZ, |
| 60 | U, hU, hZU, ?_⟩ |
| 61 | intro W hW |
| 62 | exact uniqueMinimizingBranch_prefix hM04 hCoordinates hM12 E hτ hlt (hbranch W hW) |
| 63 | |
| 64 | end PoincareMT.M14 |