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.CappedSliceValue |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.Attainment.Minimum.JointSublevel |
| 3 | import Mathlib.Topology.Semicontinuity.Basic |
| 4 | |
| 5 | /-! |
| 6 | # Lower semicontinuity of the actual capped slice value |
| 7 | |
| 8 | Morgan--Tian Proposition 16.4, pp. 389-391. Every strict sub-barrier |
| 9 | value sublevel is the time projection of a compact actual exponential |
| 10 | action sublevel. Thus the capped value is lower semicontinuous even |
| 11 | where reachability has not yet been established. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.Proofs.M46 |
| 22 | |
| 23 | variable {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 24 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport 3 X time I} |
| 25 | {T start : ℝ} {x : G.Point} |
| 26 | |
| 27 | /-- Every capped value sublevel strictly below the confinement barrier |
| 28 | is compact on a closed positive interval of square times. -/ |
| 29 | theorem cappedSliceAction_sublevel_compact |
| 30 | (hM04 : RicciFlowCurvatureTheory.{0}) |
| 31 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 32 | (LG : GeneralizedLGeometryConclusion G) |
| 33 | (E : M14ExponentialFamily G T x) (C : ActionConfinement G T start x) |
| 34 | (hstrip : Icc start T ⊆ I.domain) |
| 35 | {a c d : ℝ} (ha : 0 < a) (hc : c ^ 2 ≤ T - start) (hd : d < C.barrier) : |
| 36 | IsCompact {b : ℝ | b ∈ Icc a c ∧ cappedSliceAction G T x C.barrier b ≤ d} := by |
| 37 | classical |
| 38 | let metric := G.spacetime.horizontalMetric.toRiemannianMetric |
| 39 | let : NormedAddCommGroup (G.Horizontal x) := |
| 40 | (metric.toCore x).toNormedAddCommGroupOfTopology |
| 41 | (metric.continuousAt x) (metric.isVonNBounded x) |
| 42 | let : InnerProductSpace ℝ (G.Horizontal x) := |
| 43 | .ofCoreOfTopology (metric.toCore x) (metric.continuousAt x) (metric.isVonNBounded x) |
| 44 | let : Bundle.RiemannianBundle (G.Horizontal : G.Point → Type _) := ⟨metric⟩ |
| 45 | let : T2Space (G.Horizontal x) := |
| 46 | FiberBundle.t2Space (EuclideanSpace ℝ (Fin 3)) G.Horizontal x |
| 47 | let : T2Space (G.Horizontal x × ℝ) := inferInstance |
| 48 | have hbound (b : ℝ) (hb : b ∈ Icc a c) : b ^ 2 ≤ T - start := by |
| 49 | have hbpos := ha.trans_le hb.1 |
| 50 | have hbc := (sq_le_sq₀ hbpos.le (hbpos.le.trans hb.2)).mpr hb.2 |
| 51 | exact hbc.trans hc |
| 52 | let D := max 0 d |
| 53 | have hDB : D < C.barrier := max_lt |
| 54 | (lt_of_le_of_lt (by positivity) C.barrier_large) hd |
| 55 | let B : Set (G.Horizontal x × ℝ) := |
| 56 | {z | z.2 ∈ Icc a c ∧ z ∈ E.domain ∧ E.action z.1 z.2 ≤ D} |
| 57 | have hB : IsCompact B := exponential_joint_action_sublevel_compact hM04 hM12 LG E ha |
| 58 | (le_max_left _ _) |
| 59 | (fun b hb => hstrip ⟨by linarith [hbound b hb], sub_le_self _ (sq_nonneg b)⟩) |
| 60 | C.cage_compact (fun Z b hb hZ hZD => |
| 61 | actionConfinement_exponential_mem C E (ha.trans_le hb.1) (hbound b hb) hZ |
| 62 | (hZD.trans_lt hDB)) |
| 63 | have hcont : ContinuousOn (fun z : G.Horizontal x × ℝ => E.action z.1 z.2) B := |
| 64 | (LG.exponential.action_differential T x E).1.continuousOn.mono |
| 65 | (fun _ hz => ⟨hz.2.1, ha.trans_le hz.1.1⟩) |
| 66 | let A := B ∩ (fun z : G.Horizontal x × ℝ => E.action z.1 z.2) ⁻¹' Iic d |
| 67 | have hA : IsCompact A := hB.of_isClosed_subset |
| 68 | (hcont.preimage_isClosed_of_isClosed hB.isClosed isClosed_Iic) inter_subset_left |
| 69 | have heq : {b : ℝ | b ∈ Icc a c ∧ cappedSliceAction G T x C.barrier b ≤ d} = |
| 70 | Prod.snd '' A := by |
| 71 | ext b |
| 72 | constructor |
| 73 | · rintro ⟨hb, hval⟩ |
| 74 | obtain ⟨Z, hZ, _, hact⟩ := cappedSliceAction_exponential hM04 hM12 LG E C |
| 75 | (ha.trans_le hb.1) (hbound b hb) (hval.trans_lt hd) |
| 76 | exact ⟨(Z, b), ⟨⟨hb, hZ, hact.le.trans (hval.trans (le_max_right _ _))⟩, |
| 77 | hact.le.trans hval⟩, rfl⟩ |
| 78 | · rintro ⟨⟨Z, s⟩, hs, rfl⟩ |
| 79 | have hm := (cappedSliceAction_alternative hM04 hM12 LG E C |
| 80 | (ha.trans_le hs.1.1.1) (hbound s hs.1.1)).2.1 |
| 81 | (E.gamma Z s) (E.path Z s hs.1.2.1 (ha.trans_le hs.1.1.1)) |
| 82 | rw [← E.action_eq Z s hs.1.2.1 (ha.trans_le hs.1.1.1)] at hm |
| 83 | exact ⟨hs.1.1, hm.trans hs.2⟩ |
| 84 | rw [heq] |
| 85 | exact hA.image continuous_snd |
| 86 | |
| 87 | /-- Lower semicontinuity does not presuppose an attained path at every |
| 88 | time; the cap and compact strict sublevels cover both alternatives. -/ |
| 89 | theorem cappedSliceAction_lowerSemicontinuousOn |
| 90 | (hM04 : RicciFlowCurvatureTheory.{0}) |
| 91 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 92 | (LG : GeneralizedLGeometryConclusion G) |
| 93 | (E : M14ExponentialFamily G T x) (C : ActionConfinement G T start x) |
| 94 | (hstrip : Icc start T ⊆ I.domain) |
| 95 | {a c : ℝ} (ha : 0 < a) (hc : c ^ 2 ≤ T - start) : |
| 96 | LowerSemicontinuousOn (cappedSliceAction G T x C.barrier) (Icc a c) := by |
| 97 | intro b hb d hd |
| 98 | have hbpos := ha.trans_le hb.1 |
| 99 | have hbound : b ^ 2 ≤ T - start := |
| 100 | ((sq_le_sq₀ hbpos.le (hbpos.le.trans hb.2)).mpr hb.2).trans hc |
| 101 | have hdB := hd.trans_le |
| 102 | (cappedSliceAction_alternative hM04 hM12 LG E C hbpos hbound).1 |
| 103 | have hclosed := (cappedSliceAction_sublevel_compact hM04 hM12 LG E C hstrip ha hc hdB).isClosed |
| 104 | have hnot : b ∈ {s : ℝ | s ∈ Icc a c ∧ cappedSliceAction G T x C.barrier s ≤ d}ᶜ := |
| 105 | fun h => (not_le_of_gt hd) h.2 |
| 106 | have hnear := mem_nhdsWithin_of_mem_nhds (t := Icc a c) |
| 107 | (hclosed.isOpen_compl.mem_nhds hnot) |
| 108 | filter_upwards [hnear, self_mem_nhdsWithin] with s hs hsI |
| 109 | exact lt_of_not_ge (fun hsd => hs ⟨hsI, hsd⟩) |
| 110 | |
| 111 | end PoincareMT.Proofs.M46 |