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.Attainment.Minimum.ExponentialSublevel |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Attainment.Minimum.ConfinedAttainment |
| 3 | |
| 4 | /-! |
| 5 | # Free-endpoint minima below the surgery confinement barrier |
| 6 | |
| 7 | Morgan--Tian Proposition 16.4, p. 369 and pp. 389-391. At every slice |
| 8 | having one path below the barrier, compactness of the actual exponential |
| 9 | sublevel gives a free-endpoint minimum. Fixed-endpoint attainment compares |
| 10 | that minimum with every other admissible path on the same slice. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.Proofs.M46 |
| 21 | |
| 22 | variable {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport 3 X time I} |
| 24 | {T start : ℝ} {x : G.Point} |
| 25 | |
| 26 | /-- The actual exponential path obeys the supplied confinement bound, |
| 27 | including both endpoints of its square-root parameter interval. -/ |
| 28 | theorem actionConfinement_exponential_mem (C : ActionConfinement G T start x) |
| 29 | (E : M14ExponentialFamily G T x) {b : ℝ} (hb : 0 < b) |
| 30 | (hbStart : b ^ 2 ≤ T - start) {Z : G.Horizontal x} |
| 31 | (hZ : (Z, b) ∈ E.domain) (hZaction : E.action Z b < C.barrier) : |
| 32 | MapsTo (E.gamma Z) (Icc 0 b) C.cage := by |
| 33 | have htrace := C.paths_mem (b ^ 2) (sq_pos_of_pos hb) hbStart |
| 34 | (E.gamma Z b) (E.path Z b hZ hb) (by rwa [← E.action_eq Z b hZ hb]) |
| 35 | intro s hs |
| 36 | have hsq : s ^ 2 ∈ Icc 0 (b ^ 2) := |
| 37 | ⟨sq_nonneg s, (sq_le_sq₀ hs.1 hb.le).mpr hs.2⟩ |
| 38 | have heq := E.path_coherent Z b hZ hb (s ^ 2) hsq |
| 39 | rw [Real.sqrt_sq hs.1] at heq |
| 40 | rw [← heq] |
| 41 | exact htrace hsq |
| 42 | |
| 43 | /-- A slice reached below the barrier has a path whose action is minimal |
| 44 | among all endpoints of that slice. This uses the same chosen exponential |
| 45 | family and actual fixed-endpoint attainment. Source: Proposition 16.4, |
| 46 | pp. 389-391. -/ |
| 47 | theorem exists_confined_slice_minimum |
| 48 | (hM04 : RicciFlowCurvatureTheory.{0}) |
| 49 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 50 | (LG : GeneralizedLGeometryConclusion G) |
| 51 | (E : M14ExponentialFamily G T x) (C : ActionConfinement G T start x) |
| 52 | {b : ℝ} (hb : 0 < b) (hbStart : b ^ 2 ≤ T - start) |
| 53 | {y0 : G.Point} (p0 : M14BackwardPath G T 0 (b ^ 2) x y0) |
| 54 | (hp0 : M14BackwardLAction G p0 < C.barrier) : |
| 55 | ∃ y : G.Point, ∃ p : M14BackwardPath G T 0 (b ^ 2) x y, |
| 56 | M14IsMinimizing p ∧ M14BackwardLAction G p ≤ M14BackwardLAction G p0 ∧ |
| 57 | ∀ z : G.Point, ∀ q : M14BackwardPath G T 0 (b ^ 2) x z, |
| 58 | M14BackwardLAction G p ≤ M14BackwardLAction G q := by |
| 59 | classical |
| 60 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 61 | let : NormedAddCommGroup (G.Horizontal x) := |
| 62 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 63 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 64 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 65 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 66 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 67 | let D := max 0 (M14BackwardLAction G p0) |
| 68 | have hD : 0 ≤ D := le_max_left _ _ |
| 69 | have hDbarrier : D < C.barrier := max_lt |
| 70 | (lt_of_le_of_lt (by positivity) C.barrier_large) hp0 |
| 71 | let B : Set (G.Horizontal x) := {Z | (Z, b) ∈ E.domain ∧ E.action Z b ≤ D} |
| 72 | have hcompact : IsCompact B := exponential_action_sublevel_compact hM04 hM12 LG E hb hD |
| 73 | C.cage_compact (fun Z hZ hZD => |
| 74 | actionConfinement_exponential_mem C E hb hbStart hZ (hZD.trans_lt hDbarrier)) |
| 75 | have hrepresent {z : G.Point} (q : M14BackwardPath G T 0 (b ^ 2) x z) |
| 76 | (hq : M14BackwardLAction G q ≤ D) : |
| 77 | ∃ Z ∈ B, E.action Z b ≤ M14BackwardLAction G q := by |
| 78 | obtain ⟨p, hp⟩ := actionConfinement_attained hM12 C (sq_pos_of_pos hb) hbStart q |
| 79 | (hq.trans_lt hDbarrier) |
| 80 | obtain ⟨Z, hZsqrt, htrace, _⟩ := minimizing_exponential_branch LG E p hp |
| 81 | have hZ : (Z, b) ∈ E.domain := by simpa only [Real.sqrt_sq hb.le] using hZsqrt |
| 82 | have haction := (represented_minimizer_action E hb p hZ htrace).1 |
| 83 | exact ⟨Z, ⟨hZ, haction.le.trans ((hp q).trans hq)⟩, haction.le.trans (hp q)⟩ |
| 84 | obtain ⟨Z0, hZ0, _⟩ := hrepresent p0 (le_max_right _ _) |
| 85 | have hcontinuous : ContinuousOn (fun Z => E.action Z b) B := by |
| 86 | intro Z hZ |
| 87 | have hcont := ((LG.exponential.action_differential T x E).2 Z b hZ.1 hb).1.continuousAt |
| 88 | exact hcont.continuousWithinAt |
| 89 | obtain ⟨Z, hZ, hmin⟩ := hcompact.exists_isMinOn ⟨Z0, hZ0⟩ hcontinuous |
| 90 | let p := E.path Z b hZ.1 hb |
| 91 | have hall (z : G.Point) (q : M14BackwardPath G T 0 (b ^ 2) x z) : |
| 92 | M14BackwardLAction G p ≤ M14BackwardLAction G q := by |
| 93 | rw [← E.action_eq Z b hZ.1 hb] |
| 94 | by_cases hq : D ≤ M14BackwardLAction G q |
| 95 | · exact hZ.2.trans hq |
| 96 | · obtain ⟨W, hW, hWq⟩ := hrepresent q (le_of_not_ge hq) |
| 97 | exact (hmin hW).trans hWq |
| 98 | exact ⟨E.gamma Z b, p, hall _, hall _ p0, hall⟩ |
| 99 | |
| 100 | end PoincareMT.Proofs.M46 |