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.StandardCap.Existence.Construction.Flow.PartialFlowOrder |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Flow.FlowLocality |
| 3 | |
| 4 | /-! |
| 5 | # Bounded compatible chains of partial standard-cap flows |
| 6 | |
| 7 | Choose metric/connection pairs together from a chain. Each queried compact |
| 8 | time slab lies in one member, which supplies its spatially uniform curvature |
| 9 | bound. This constructs the actual union at the finite lifetime supremum, |
| 10 | as in Morgan-Tian Theorem 12.5, p. 297; see the reviewed continuation derivation. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Topology |
| 17 | |
| 18 | namespace PoincareMT.M34 |
| 19 | |
| 20 | /-- A nonempty compatible chain with bounded lifetimes has an actual |
| 21 | partial-flow upper bound at its lifetime supremum (Theorem 12.5, p. 297). -/ |
| 22 | theorem partialFlowChain_has_upper_bound {g0 : StandardInitialMetric} |
| 23 | {c : Set (PartialStandardCapFlow g0)} (hc : IsChain partialFlowLE c) |
| 24 | (hne : c.Nonempty) (hbdd : BddAbove ((fun F => F.lifetime) '' c)) : |
| 25 | ∃ G : PartialStandardCapFlow g0, G.lifetime = sSup ((fun F => F.lifetime) '' c) ∧ |
| 26 | ∀ F ∈ c, partialFlowLE F G := by |
| 27 | classical |
| 28 | let L := (fun F : PartialStandardCapFlow g0 => F.lifetime) '' c |
| 29 | let S := sSup L |
| 30 | obtain ⟨F0, hF0⟩ := hne |
| 31 | have hLne : L.Nonempty := ⟨F0.lifetime, F0, hF0, rfl⟩ |
| 32 | have hle (F : c) : F.val.lifetime ≤ S := le_csSup hbdd ⟨F.val, F.property, rfl⟩ |
| 33 | have hS : 0 < S := F0.lifetime_pos.trans_le (hle ⟨F0, hF0⟩) |
| 34 | have hcover : ∀ t ∈ Ico 0 S, ∃ F : c, t ∈ Ico 0 F.val.lifetime := by |
| 35 | intro t ht |
| 36 | obtain ⟨T, ⟨F, hF, rfl⟩, htF⟩ := exists_lt_of_lt_csSup hLne ht.2 |
| 37 | exact ⟨⟨F, hF⟩, ht.1, htF⟩ |
| 38 | let index : ℝ → c := fun t => |
| 39 | if h : ∃ F : c, t ∈ Ico 0 F.val.lifetime then h.choose else ⟨F0, hF0⟩ |
| 40 | have hindex {t : ℝ} (ht : t ∈ Ico 0 S) : |
| 41 | t ∈ Ico 0 (index t).val.lifetime := by |
| 42 | dsimp [index] |
| 43 | rw [dif_pos (hcover t ht)] |
| 44 | exact (hcover t ht).choose_spec |
| 45 | let data := fun t => partialFlowData (index t).val t |
| 46 | have hmatch (F : c) {t : ℝ} (ht : t ∈ Ico 0 S) |
| 47 | (htF : t ∈ Ico 0 F.val.lifetime) : data t = partialFlowData F.val t := |
| 48 | partialFlowData_eq_of_chain hc (index t).property F.property (hindex ht) htF |
| 49 | let g := fun t => (data t).1 |
| 50 | let D := fun t => (data t).2 |
| 51 | have hnontrivial : (Ico 0 S).Nontrivial := by |
| 52 | refine ⟨0, ⟨le_rfl, hS⟩, S / 2, ⟨by linarith, by linarith⟩, ?_⟩ |
| 53 | linarith |
| 54 | have hloc : ∀ t ∈ Ico 0 S, ∃ K : Set ℝ, ∃ F : RicciFlow 3 StandardCapSpace K, |
| 55 | t ∈ K ∧ K ∈ 𝓝[Ico 0 S] t ∧ g =ᶠ[𝓝[Ico 0 S] t] F.metric := by |
| 56 | intro t ht |
| 57 | obtain ⟨F, htF⟩ := hcover t ht |
| 58 | have hK : Ico 0 F.val.lifetime ∈ 𝓝[Ico 0 S] t := by |
| 59 | filter_upwards [self_mem_nhdsWithin, |
| 60 | mem_nhdsWithin_of_mem_nhds (Iio_mem_nhds htF.2)] with s hs hs' |
| 61 | exact ⟨hs.1, hs'⟩ |
| 62 | refine ⟨Ico 0 F.val.lifetime, F.val.flow, htF, hK, ?_⟩ |
| 63 | filter_upwards [self_mem_nhdsWithin, hK] with s hs hsF |
| 64 | exact congrArg Sigma.fst (hmatch F hs hsF) |
| 65 | let G := flowOfLocalRepresentatives (Ico 0 S) g D ordConnected_Ico hnontrivial hloc |
| 66 | have hzero := Sigma.mk.inj_iff.mp (hmatch ⟨F0, hF0⟩ |
| 67 | ⟨le_rfl, hS⟩ ⟨le_rfl, F0.lifetime_pos⟩) |
| 68 | let U : PartialStandardCapFlow g0 := { |
| 69 | lifetime := S |
| 70 | lifetime_pos := hS |
| 71 | flow := G |
| 72 | initial_metric := hzero.1.trans F0.initial_metric |
| 73 | initial_connection := hzero.2.trans F0.initial_connection |
| 74 | curvature_locally_bounded := by |
| 75 | intro T0 hT0 hT0S |
| 76 | obtain ⟨F, htF⟩ := hcover T0 ⟨hT0, hT0S⟩ |
| 77 | obtain ⟨K, hK, hbound⟩ := F.val.curvature_locally_bounded T0 hT0 htF.2 |
| 78 | refine ⟨K, hK, fun t ht x => ?_⟩ |
| 79 | have heq := congrArg Sigma.fst (hmatch F |
| 80 | ⟨ht.1, ht.2.trans_lt hT0S⟩ ⟨ht.1, ht.2.trans_lt htF.2⟩) |
| 81 | have hnorm := curvatureTensorNorm_eq_of_metric_eq heq |
| 82 | (G.connection t) (F.val.flow.connection t) x |
| 83 | exact (congrArg abs hnorm).le.trans (hbound t ht x) } |
| 84 | refine ⟨U, rfl, fun F hF => ⟨hle ⟨F, hF⟩, fun t ht => ?_⟩⟩ |
| 85 | exact (hmatch ⟨F, hF⟩ ⟨ht.1, ht.2.trans_le (hle ⟨F, hF⟩)⟩ ht).symm |
| 86 | |
| 87 | end PoincareMT.M34 |