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.Confinement.SmallTimeConfinementCore |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Coordinates.GaugeLift |
| 3 | |
| 4 | /-! |
| 5 | # Uniform confinement of arbitrary low-action competitors |
| 6 | |
| 7 | Morgan-Tian Corollary 6.79, pp. 144-145, with the whole-slab |
| 8 | curvature hypothesis in the frozen generalized statement. Every |
| 9 | admissible competitor with action at most `A * sqrt tau` stays in |
| 10 | any prescribed open neighborhood for all sufficiently small `tau`. |
| 11 | The time bound is independent of the path and its terminal point. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | -- The supplied spacetime and open gauge models keep their prescribed tangent operations. |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set Filter MeasureTheory |
| 19 | open scoped Manifold ContDiff Bundle Topology intervalIntegral |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M14 |
| 24 | |
| 25 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 26 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 27 | |
| 28 | /-- A fixed whole-slab curvature bound confines every sufficiently |
| 29 | short admissible competitor of action `O(sqrt tau)` to a prescribed |
| 30 | open neighborhood, Corollary 6.79, pp. 144-145. No minimizing, |
| 31 | completeness, Euler, or curvature-derivative premise is imposed. -/ |
| 32 | theorem exists_smallTime_action_confinement |
| 33 | (hM12 : GeneralizedRicciGaugeTheory.{u} n) (x : G.Point) |
| 34 | {T δ A C : ℝ} (hδ : 0 < δ) (hA : 0 ≤ A) (hC : 0 ≤ C) |
| 35 | (hcurv : ∀ q : G.Point, G.spacetime.timeFunction q ∈ Icc (T - δ) T → |
| 36 | horizontalCurvatureNorm G.leafwise q ≤ C) |
| 37 | {O : Set G.Point} (hO : IsOpen O) (hxO : x ∈ O) : |
| 38 | ∃ τ₀ : ℝ, 0 < τ₀ ∧ τ₀ ≤ δ ∧ ∀ τ ∈ Ioc 0 τ₀, ∀ y : G.Point, |
| 39 | ∀ p : M14BackwardPath G T 0 τ x y, |
| 40 | M14BackwardLAction G p ≤ A * Real.sqrt τ → MapsTo p.curve (Icc 0 τ) O := by |
| 41 | classical |
| 42 | let : LocallyCompactSpace (EuclideanHalfSpace 1) := by |
| 43 | change LocallyCompactSpace {v : EuclideanSpace ℝ (Fin 1) // 0 ≤ v 0} |
| 44 | have hc : Continuous (fun v : EuclideanSpace ℝ (Fin 1) => v 0) := by fun_prop |
| 45 | exact (isClosed_le continuous_const hc).locallyCompactSpace |
| 46 | let : LocallyCompactSpace |
| 47 | (ModelProd (EuclideanHalfSpace 1) (EuclideanSpace ℝ (Fin n))) := |
| 48 | inferInstanceAs (LocallyCompactSpace |
| 49 | (EuclideanHalfSpace 1 × EuclideanSpace ℝ (Fin n))) |
| 50 | let : LocallyCompactSpace G.Point := ChartedSpace.locallyCompactSpace |
| 51 | (ModelProd (EuclideanHalfSpace 1) (EuclideanSpace ℝ (Fin n))) G.Point |
| 52 | obtain ⟨b, U, lift, hU, hxU, hlift, hright, hclock⟩ := exists_smooth_gauge_lift G x |
| 53 | obtain ⟨K, hK, hxK, hKUO⟩ := exists_compact_subset (hU.inter hO) ⟨hxU, hxO⟩ |
| 54 | have hKU : K ⊆ U := fun q hq => (hKUO hq).1 |
| 55 | have hKO : K ⊆ O := fun q hq => (hKUO hq).2 |
| 56 | obtain ⟨κ, hκ, hcoercive⟩ := compact_gauge_metric_coercive b lift hK |
| 57 | (hlift.continuousOn.mono hKU) (lift x).2 |
| 58 | have hnear : (G.gaugeCover.cylinder b).toSpacetime ⁻¹' interior K ∈ 𝓝 (lift x) := |
| 59 | (G.gaugeCover.cylinder b).smooth.continuous.continuousAt.preimage_mem_nhds |
| 60 | (isOpen_interior.mem_nhds (by simpa only [hright x hxU] using hxK)) |
| 61 | obtain ⟨ε, hε, hball⟩ := Metric.mem_nhds_iff.mp hnear |
| 62 | let D : ℝ := 2 * A + 4 * δ * ((n : ℝ) ^ 2 * C) |
| 63 | have hD : 0 ≤ D := by dsimp only [D]; positivity |
| 64 | have hD1 : 0 < D + 1 := by linarith |
| 65 | let τ₀ := min δ (min (ε / 2) (κ * ε ^ 2 / (D + 1))) |
| 66 | have hτ₀ : 0 < τ₀ := lt_min hδ (lt_min (by positivity) (by positivity)) |
| 67 | refine ⟨τ₀, hτ₀, min_le_left _ _, ?_⟩ |
| 68 | intro τ hτ y p hp |
| 69 | have hτδ : τ ≤ δ := hτ.2.trans (min_le_left _ _) |
| 70 | have hτε : τ < ε := |
| 71 | (hτ.2.trans ((min_le_right _ _).trans (min_le_left _ _))).trans_lt (by linarith) |
| 72 | have hτbound : τ ≤ κ * ε ^ 2 / (D + 1) := |
| 73 | hτ.2.trans ((min_le_right _ _).trans (min_le_right _ _)) |
| 74 | have hsmall : D * τ < κ * ε ^ 2 := by |
| 75 | have hh := (le_div_iff₀ hD1).mp hτbound |
| 76 | nlinarith [hτ.1] |
| 77 | have hkin := squarePath_kinetic_energy_le_of_curvature_bound p hM12 hτδ hC hcurv |
| 78 | simp only [Real.sqrt_zero, sub_zero] at hkin |
| 79 | have hupper : (∫ s in 0..Real.sqrt τ, pathSquareKinetic p s) ≤ |
| 80 | (2 * A + 4 * τ * ((n : ℝ) ^ 2 * C)) * Real.sqrt τ := by |
| 81 | calc |
| 82 | _ ≤ 2 * M14BackwardLAction G p + |
| 83 | 4 * τ * ((n : ℝ) ^ 2 * C) * Real.sqrt τ := hkin |
| 84 | _ ≤ 2 * (A * Real.sqrt τ) + |
| 85 | 4 * τ * ((n : ℝ) ^ 2 * C) * Real.sqrt τ := |
| 86 | add_le_add (mul_le_mul_of_nonneg_left hp (by norm_num : (0 : ℝ) ≤ 2)) le_rfl |
| 87 | _ = _ := by ring |
| 88 | have hcoeff : 2 * A + 4 * τ * ((n : ℝ) ^ 2 * C) ≤ D := by |
| 89 | dsimp only [D] |
| 90 | have hh := mul_le_mul_of_nonneg_right hτδ |
| 91 | (mul_nonneg (sq_nonneg (n : ℝ)) hC) |
| 92 | nlinarith |
| 93 | have henergy : Real.sqrt τ * (∫ s in 0..Real.sqrt τ, pathSquareKinetic p s) < |
| 94 | κ * ε ^ 2 := by |
| 95 | calc |
| 96 | _ ≤ Real.sqrt τ * ((2 * A + 4 * τ * ((n : ℝ) ^ 2 * C)) * Real.sqrt τ) := |
| 97 | mul_le_mul_of_nonneg_left hupper (Real.sqrt_nonneg τ) |
| 98 | _ = (2 * A + 4 * τ * ((n : ℝ) ^ 2 * C)) * (Real.sqrt τ) ^ 2 := by ring |
| 99 | _ = (2 * A + 4 * τ * ((n : ℝ) ^ 2 * C)) * τ := by rw [Real.sq_sqrt hτ.1.le] |
| 100 | _ ≤ D * τ := mul_le_mul_of_nonneg_right hcoeff hτ.1.le |
| 101 | _ < κ * ε ^ 2 := hsmall |
| 102 | have hconf := squarePath_mapsTo_gauge_core_of_energy p b lift hM12 hlift hright hclock |
| 103 | hKU hK.isClosed hxK hκ.le hε hcoercive hball hτε henergy |
| 104 | intro t ht |
| 105 | have hs : Real.sqrt t ∈ Icc 0 (Real.sqrt τ) := |
| 106 | ⟨Real.sqrt_nonneg t, Real.sqrt_le_sqrt ht.2⟩ |
| 107 | simpa only [Real.sq_sqrt ht.1] using hKO (interior_subset (hconf hs)) |
| 108 | |
| 109 | end PoincareMT.M14 |