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.Surgery.Induction.Noncollapse.StableSet.RegularImage.SurvivalSlice |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Regularity.Lipschitz.LocalLipschitzConfinedEnergy |
| 3 | |
| 4 | /-! |
| 5 | # Uniform initial vectors of all confined minimizers |
| 6 | |
| 7 | Morgan--Tian Proposition 6.59 and Lemma 6.60, pp. 134-137, used in |
| 8 | Claims 6.68-6.69 and Corollary 6.67, pp. 139-140. The lower M14 energy |
| 9 | estimate applies to every supplied square Euler path, including parameter |
| 10 | zero. Path regularization comes directly from the supplied M14 conclusion. |
| 11 | The bound therefore does not presume an already stable endpoint. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set |
| 17 | open scoped Manifold ContDiff Bundle |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.Proofs.M46 |
| 22 | |
| 23 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 25 | {T tau : ℝ} {x y : G.Point} |
| 26 | |
| 27 | private theorem transported_inner {a b : G.Point} (h : a = b) (v : G.Horizontal a) : |
| 28 | G.spacetime.horizontalMetric.inner b (h ▸ v) (h ▸ v) = |
| 29 | G.spacetime.horizontalMetric.inner a v v := by |
| 30 | cases h |
| 31 | rfl |
| 32 | |
| 33 | /-- The actual square velocity at zero is twice the supplied initial |
| 34 | vector, retaining the chosen horizontal metric, Lemma 6.18, p. 114. -/ |
| 35 | theorem initialValue_energy_zero {Z : G.Horizontal x} |
| 36 | (Q : M14SquareRootInitialValuePath G T tau x y Z) : |
| 37 | G.spacetime.horizontalMetric.inner (Q.square_path.curve 0) |
| 38 | (Q.square_path.horizontal_velocity 0) (Q.square_path.horizontal_velocity 0) = |
| 39 | 4 * G.spacetime.horizontalMetric.inner x Z Z := by |
| 40 | obtain ⟨hzero, hvelocity⟩ := Q.initial_velocity |
| 41 | rw [← transported_inner hzero, hvelocity] |
| 42 | simp only [map_smul, smul_apply, smul_eq_mul] |
| 43 | ring |
| 44 | |
| 45 | /-- Positive time and action bounds, together with Ricci and scalar-gradient |
| 46 | bounds on the common cage, uniformly bound the initial vector of every |
| 47 | minimizer. The same chosen exponential represents the whole path, |
| 48 | Proposition 6.59 and Lemma 6.60, pp. 134-137. -/ |
| 49 | theorem confined_minimizers_initial_bound |
| 50 | (LG : GeneralizedLGeometryConclusion G) |
| 51 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 52 | (E : M14ExponentialFamily G T x) |
| 53 | {F0 : Set G.Point} {delta H D CR Cgrad : ℝ} |
| 54 | (hdelta : 0 < delta) (hD : 0 ≤ D) (hCR : 0 ≤ CR) (hCgrad : 0 ≤ Cgrad) |
| 55 | (hRic : ∀ q ∈ F0, ∀ v w : G.Horizontal q, |horizontalRicci G.leafwise q v w| ≤ |
| 56 | CR * Real.sqrt (G.spacetime.horizontalMetric.inner q v v) * |
| 57 | Real.sqrt (G.spacetime.horizontalMetric.inner q w w)) |
| 58 | (hgrad : ∀ q ∈ F0, ∀ v : G.Horizontal q, |
| 59 | |M14HorizontalScalarDifferential G q v.val| ≤ |
| 60 | Cgrad * Real.sqrt (G.spacetime.horizontalMetric.inner q v v)) : |
| 61 | ∃ C : ℝ, 0 ≤ C ∧ ∀ tau : ℝ, |
| 62 | delta ≤ Real.sqrt tau → Real.sqrt tau ≤ H → ∀ y : G.Point, |
| 63 | ∀ p : M14BackwardPath G T 0 tau x y, M14IsMinimizing p → |
| 64 | M14BackwardLAction G p ≤ D → MapsTo p.curve (Icc 0 tau) F0 → |
| 65 | ∃ Z : G.Horizontal x, (Z, Real.sqrt tau) ∈ E.domain ∧ |
| 66 | EqOn p.curve (fun s => E.gamma Z (Real.sqrt s)) (Icc 0 tau) ∧ |
| 67 | E.gamma Z (Real.sqrt tau) = y ∧ |
| 68 | G.spacetime.horizontalMetric.inner x Z Z ≤ C := by |
| 69 | let A := 2 * H ^ 2 * Cgrad + 4 * H * CR |
| 70 | let B := Real.exp (A * H) * (2 * D + 4 * ((n : ℝ) * CR) * H ^ 3 + H) |
| 71 | let C := (Real.sqrt (B / delta + 4 * H ^ 2)) ^ 2 |
| 72 | refine ⟨C, sq_nonneg _, ?_⟩ |
| 73 | intro tau htimeLow htimeHigh y p hp haction hconf |
| 74 | obtain ⟨Z, Q, hQ⟩ := minimizing_initialValuePath LG p hp |
| 75 | have hconfR (s : ℝ) (hs : s ∈ M14SqrtParameterInterval 0 tau) : |
| 76 | Q.square_path.curve s ∈ F0 := by |
| 77 | rw [Q.square_path.agrees s hs, hQ] |
| 78 | apply hconf |
| 79 | have hs0 : 0 ≤ s := by simpa only [Real.sqrt_zero] using hs.1 |
| 80 | exact ⟨sq_nonneg s, (sq_le_sq₀ hs0 (Real.sqrt_nonneg _) |>.mpr hs.2).trans |
| 81 | (Real.sq_sqrt p.tau_lt.le).le⟩ |
| 82 | have hzero : (0 : ℝ) ∈ M14SqrtParameterInterval 0 tau := by |
| 83 | exact ⟨by simp, Real.sqrt_nonneg tau⟩ |
| 84 | have henergy := M14.squareRoot_energy_uniform_bound hM12 Q.square_path Q.extension |
| 85 | Q.euler hdelta htimeLow htimeHigh hCR hCgrad hD |
| 86 | (by simpa only [hQ] using haction) |
| 87 | (fun s hs => hRic _ (hconfR s hs)) |
| 88 | (fun s hs => hgrad _ (hconfR s hs)) hzero |
| 89 | change G.spacetime.horizontalMetric.inner (Q.square_path.curve 0) |
| 90 | (Q.square_path.horizontal_velocity 0) (Q.square_path.horizontal_velocity 0) + |
| 91 | 4 * (0 : ℝ) ^ 2 ≤ C at henergy |
| 92 | rw [initialValue_energy_zero Q] at henergy |
| 93 | obtain ⟨hsurvive, htrace, hend⟩ := initialValue_exponential_branch E Q |
| 94 | rw [hQ] at htrace |
| 95 | refine ⟨Z, hsurvive, htrace, hend, ?_⟩ |
| 96 | have hC : 0 ≤ C := sq_nonneg _ |
| 97 | nlinarith |
| 98 | |
| 99 | end PoincareMT.Proofs.M46 |