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.Assembly.RegularRegion |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.SmallTime.Confinement.SmallTimeEnergy |
| 3 | import Mathlib.Topology.Order.IsLUB |
| 4 | |
| 5 | /-! |
| 6 | # Actual minimizing sequences confined by the action barrier |
| 7 | |
| 8 | Proposition 16.4, p. 369, and Claim 16.25, pp. 389-390. |
| 9 | Compact confinement bounds the actual scalar potential below. The |
| 10 | literal action infimum is finite, and an actual minimizing sequence |
| 11 | stays below the same barrier with uniformly bounded square kinetic energy. |
| 12 | No minimizing path or initial exponential vector is assumed. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | -- Square-time kinetic energy retains the actual horizontal fibers. |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter MeasureTheory |
| 20 | open scoped Manifold ContDiff Topology intervalIntegral |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.Proofs.M46 |
| 25 | |
| 26 | variable {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 27 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport 3 X time I} |
| 28 | {T start : ℝ} {x y : G.Point} |
| 29 | |
| 30 | /-- The actual kinetic density is nonnegative without any regularity |
| 31 | of its endpoint velocity values. Source: equation (6.2), p. 106. -/ |
| 32 | theorem pathSquareKinetic_nonneg {a b : ℝ} |
| 33 | (p : M14BackwardPath G T a b x y) (s : ℝ) : 0 ≤ M14.pathSquareKinetic p s := by |
| 34 | let v := (2 * s) • p.horizontal_velocity (s ^ 2) |
| 35 | change 0 ≤ G.spacetime.horizontalMetric.inner (p.curve (s ^ 2)) v v |
| 36 | by_cases hv : v = 0 |
| 37 | · simp only [hv, map_zero, le_refl] |
| 38 | · exact (G.spacetime.horizontalMetric.pos (p.curve (s ^ 2)) v hv).le |
| 39 | |
| 40 | /-- Compact confinement gives a finite literal action value and |
| 41 | an actual minimizing sequence with uniformly bounded square energy. |
| 42 | Source: Proposition 16.4 and Claim 16.25, pp. 369 and 389-390. -/ |
| 43 | theorem exists_confined_minimizing_sequence |
| 44 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 45 | (C : ActionConfinement G T start x) {tau : ℝ} |
| 46 | (htau : 0 < tau) (htauStart : tau ≤ T - start) |
| 47 | (p₀ : M14BackwardPath G T 0 tau x y) |
| 48 | (hp₀ : M14BackwardLAction G p₀ < C.barrier) : |
| 49 | M14FiniteValueDomain G T 0 tau x y ∧ |
| 50 | ∃ (p : ℕ → M14BackwardPath G T 0 tau x y) (D : ℝ), 0 ≤ D ∧ |
| 51 | (∀ k, M14BackwardLAction G (p k) < C.barrier ∧ |
| 52 | MapsTo (p k).curve (Icc 0 tau) C.cage) ∧ |
| 53 | Antitone (fun k => M14BackwardLAction G (p k)) ∧ |
| 54 | Tendsto (fun k => M14BackwardLAction G (p k)) atTop |
| 55 | (𝓝 (M14ActionValue G T 0 tau x y)) ∧ |
| 56 | ∀ k, IntervalIntegrable (M14.pathSquareKinetic (p k)) volume 0 (Real.sqrt tau) ∧ |
| 57 | (∫ s in 0..Real.sqrt tau, M14.pathSquareKinetic (p k) s) ≤ D := by |
| 58 | classical |
| 59 | have H := (hM12.leafwise_calculus X time I G.spacetime G.slices |
| 60 | G.timeIntervals G.gaugeCover).2 G.leafwise |
| 61 | obtain ⟨m, hm⟩ := (C.cage_compact.image H.scalar_smooth.continuous).bddBelow |
| 62 | let R := max 0 (-m) |
| 63 | have hR : 0 ≤ R := le_max_left _ _ |
| 64 | have hscalar (q : G.Point) (hq : q ∈ C.cage) : |
| 65 | -R ≤ horizontalScalarCurvature G.leafwise q := by |
| 66 | have hm' := hm (mem_image_of_mem (horizontalScalarCurvature G.leafwise) hq) |
| 67 | have hmR : -m ≤ R := le_max_right _ _ |
| 68 | linarith |
| 69 | have hkinetic (p : M14BackwardPath G T 0 tau x y) |
| 70 | (hp : M14BackwardLAction G p < C.barrier) : |
| 71 | (∫ s in 0..Real.sqrt tau, M14.pathSquareKinetic p s) ≤ |
| 72 | 2 * M14BackwardLAction G p + 4 * tau * R * Real.sqrt tau := by |
| 73 | have h := M14.squarePath_kinetic_energy_le_action p hM12 hR (fun s hs => |
| 74 | hscalar _ (C.paths_mem tau htau htauStart y p hp (M14.squarePath_parameter_mem p hs))) |
| 75 | simpa only [Real.sqrt_zero, sub_zero] using h |
| 76 | have hlower (p : M14BackwardPath G T 0 tau x y) |
| 77 | (hp : M14BackwardLAction G p < C.barrier) : |
| 78 | -(2 * tau * R * Real.sqrt tau) ≤ M14BackwardLAction G p := by |
| 79 | have hn : 0 ≤ ∫ s in 0..Real.sqrt tau, M14.pathSquareKinetic p s := |
| 80 | intervalIntegral.integral_nonneg (Real.sqrt_nonneg tau) |
| 81 | (fun s _ => pathSquareKinetic_nonneg p s) |
| 82 | linarith [hkinetic p hp] |
| 83 | have hbounded : BddBelow (M14ActionSet G T 0 tau x y) := by |
| 84 | refine ⟨min C.barrier (-(2 * tau * R * Real.sqrt tau)), ?_⟩ |
| 85 | rintro a ⟨p, rfl⟩ |
| 86 | by_cases hp : M14BackwardLAction G p < C.barrier |
| 87 | · exact (min_le_right _ _).trans (hlower p hp) |
| 88 | · exact (min_le_left _ _).trans (le_of_not_gt hp) |
| 89 | have hnonempty : (M14ActionSet G T 0 tau x y).Nonempty := |
| 90 | ⟨M14BackwardLAction G p₀, p₀, rfl⟩ |
| 91 | refine ⟨⟨hnonempty, hbounded⟩, ?_⟩ |
| 92 | obtain ⟨a, ha, hlimit, hamem⟩ := exists_seq_tendsto_sInf hnonempty hbounded |
| 93 | choose p hp using hamem |
| 94 | have hlow : M14ActionValue G T 0 tau x y < C.barrier := |
| 95 | (csInf_le hbounded ⟨p₀, rfl⟩).trans_lt hp₀ |
| 96 | have hlimit' : Tendsto (fun k => M14BackwardLAction G (p k)) atTop |
| 97 | (𝓝 (M14ActionValue G T 0 tau x y)) := by |
| 98 | simpa only [hp, M14ActionValue] using hlimit |
| 99 | obtain ⟨N, hN⟩ := eventually_atTop.mp (hlimit'.eventually (Iio_mem_nhds hlow)) |
| 100 | let q : ℕ → M14BackwardPath G T 0 tau x y := fun k => p (k + N) |
| 101 | have hq (k : ℕ) : M14BackwardLAction G (q k) < C.barrier := hN _ (Nat.le_add_left _ _) |
| 102 | let D := 2 * C.barrier + 4 * tau * R * Real.sqrt tau |
| 103 | have hD : 0 ≤ D := by |
| 104 | have hn : 0 ≤ ∫ s in 0..Real.sqrt tau, M14.pathSquareKinetic (q 0) s := |
| 105 | intervalIntegral.integral_nonneg (Real.sqrt_nonneg tau) |
| 106 | (fun s _ => pathSquareKinetic_nonneg (q 0) s) |
| 107 | have hk := hkinetic (q 0) (hq 0) |
| 108 | dsimp only [D] |
| 109 | linarith [hq 0] |
| 110 | refine ⟨q, D, hD, fun k => |
| 111 | ⟨hq k, C.paths_mem tau htau htauStart y (q k) (hq k)⟩, ?_, ?_, ?_⟩ |
| 112 | · intro j k hjk |
| 113 | simpa only [q, hp] using ha (Nat.add_le_add_right hjk N) |
| 114 | · exact hlimit'.comp (tendsto_add_atTop_nat N) |
| 115 | · intro k |
| 116 | refine ⟨?_, ?_⟩ |
| 117 | · have hk : IntervalIntegrable (M14.pathSquareKinetic (q k)) volume |
| 118 | (Real.sqrt 0) (Real.sqrt tau) := |
| 119 | M14.squarePath_kinetic_intervalIntegrable (q k) hM12 |
| 120 | simpa only [Real.sqrt_zero] using hk |
| 121 | · have h := hkinetic (q k) (hq k) |
| 122 | dsimp only [D] |
| 123 | linarith [hq k] |
| 124 | |
| 125 | end PoincareMT.Proofs.M46 |