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.Geometry |
| 2 | |
| 3 | /-! |
| 4 | # Compatibility of actual partial standard-cap flows |
| 5 | |
| 6 | Continuation retains both whole metric records and their chosen connections |
| 7 | on the old interval. Total records outside that interval are irrelevant, |
| 8 | so this is a preorder relation, without an antisymmetry assertion. |
| 9 | This is the chain construction for Morgan-Tian Definition 12.4 and |
| 10 | Theorem 12.5, pp. 295-297; see the maximal-continuation-restart derivation. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | |
| 17 | namespace PoincareMT.M34 |
| 18 | |
| 19 | variable {g0 : StandardInitialMetric} |
| 20 | |
| 21 | /-- The actual metric and retained connection of a partial flow at one time |
| 22 | (Definition 12.4, pp. 295-296). -/ |
| 23 | def partialFlowData (F : PartialStandardCapFlow g0) (t : ℝ) : |
| 24 | Σ g : RiemannianMetric 3 StandardCapSpace, LeviCivitaData g := |
| 25 | ⟨F.flow.metric t, F.flow.connection t⟩ |
| 26 | |
| 27 | /-- Continuation order, preserving both records on the smaller interval |
| 28 | (Definition 12.4, pp. 295-296). -/ |
| 29 | def partialFlowLE (F G : PartialStandardCapFlow g0) : Prop := |
| 30 | F.lifetime ≤ G.lifetime ∧ EqOn (partialFlowData F) (partialFlowData G) |
| 31 | (Ico 0 F.lifetime) |
| 32 | |
| 33 | /-- A partial flow continues itself (Definition 12.4, pp. 295-296). -/ |
| 34 | theorem partialFlowLE_refl (F : PartialStandardCapFlow g0) : partialFlowLE F F := |
| 35 | ⟨le_rfl, fun _ _ => rfl⟩ |
| 36 | |
| 37 | /-- Compatible continuation is transitive (Definition 12.4, pp. 295-296). -/ |
| 38 | theorem partialFlowLE_trans {F G H : PartialStandardCapFlow g0} |
| 39 | (hFG : partialFlowLE F G) (hGH : partialFlowLE G H) : partialFlowLE F H := |
| 40 | ⟨hFG.1.trans hGH.1, fun _ ht => |
| 41 | (hFG.2 ht).trans (hGH.2 ⟨ht.1, ht.2.trans_le hFG.1⟩)⟩ |
| 42 | |
| 43 | /-- Comparable chain members retain identical metric/connection pairs |
| 44 | throughout their overlap (Theorem 12.5, p. 297). -/ |
| 45 | theorem partialFlowData_eq_of_chain {c : Set (PartialStandardCapFlow g0)} |
| 46 | (hc : IsChain partialFlowLE c) {F G : PartialStandardCapFlow g0} |
| 47 | (hF : F ∈ c) (hG : G ∈ c) {t : ℝ} |
| 48 | (htF : t ∈ Ico 0 F.lifetime) (htG : t ∈ Ico 0 G.lifetime) : |
| 49 | partialFlowData F t = partialFlowData G t := by |
| 50 | rcases eq_or_ne F G with rfl | hne |
| 51 | · rfl |
| 52 | rcases hc hF hG hne with h | h |
| 53 | · exact h.2 htF |
| 54 | · exact (h.2 htG).symm |
| 55 | |
| 56 | /-- A frozen strict extension is itself a partial flow, with all its |
| 57 | original record fields retained (Definition 12.4, pp. 295-296). -/ |
| 58 | def partialFlowOfExtension {F : PartialStandardCapFlow g0} {T : ℝ} |
| 59 | (E : PartialStandardCapFlowExtension F T) : PartialStandardCapFlow g0 where |
| 60 | lifetime := T |
| 61 | lifetime_pos := F.lifetime_pos.trans E.lifetime_gt |
| 62 | flow := E.flow |
| 63 | initial_metric := E.initial_metric |
| 64 | initial_connection := E.initial_connection |
| 65 | curvature_locally_bounded := E.curvature_locally_bounded |
| 66 | |
| 67 | /-- Every frozen strict extension lies above its original flow in the |
| 68 | record-preserving continuation order (Definition 12.4, pp. 295-296). -/ |
| 69 | theorem partialFlowLE_extension {F : PartialStandardCapFlow g0} {T : ℝ} |
| 70 | (E : PartialStandardCapFlowExtension F T) : |
| 71 | partialFlowLE F (partialFlowOfExtension E) := by |
| 72 | refine ⟨E.lifetime_gt.le, fun t ht => ?_⟩ |
| 73 | exact Sigma.mk.inj_iff.mpr |
| 74 | ⟨(E.agrees_on_old_domain ht).symm, (E.agrees_on_connection t ht).symm⟩ |
| 75 | |
| 76 | end PoincareMT.M34 |