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.TerminalRestart |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.Geometry.Flow.JoinedFlow |
| 3 | |
| 4 | /-! |
| 5 | # A bounded partial cap flow admits a strict continuation |
| 6 | |
| 7 | At the full lifetime, the terminal closure and the actual forward restart |
| 8 | join smoothly. The joined flow retains both old records on the whole |
| 9 | old domain and has one global curvature bound. This fills the frozen |
| 10 | strict-extension structure used by Morgan-Tian Theorem 12.5, |
| 11 | pp. 296-297. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | namespace PoincareMT.M34 |
| 21 | |
| 22 | /-- A spatially and temporally uniform full-curvature bound through |
| 23 | the entire finite lifetime gives a genuine strict record-preserving |
| 24 | continuation (Theorem 12.5, pp. 296-297). -/ |
| 25 | theorem partialFlow_extension_exists_of_curvature_bound |
| 26 | (P : M34StandardCapPredecessors) {g0 : StandardInitialMetric} |
| 27 | (E0 : StandardCapEstimate g0) (F : PartialStandardCapFlow g0) |
| 28 | {B : ℝ} (hB : 0 < B) |
| 29 | (hfull : ∀ t ∈ Ico 0 F.lifetime, ∀ x : StandardCapSpace, |
| 30 | (F.flow.connection t).curvatureTensorNorm x ≤ B) : |
| 31 | ∃ T : ℝ, Nonempty (PartialStandardCapFlowExtension F T) := by |
| 32 | obtain ⟨L⟩ := partialFlowTerminalJets_nonempty P.curvature E0 F |
| 33 | F.lifetime_pos le_rfl hB hfull |
| 34 | let gS := L.metric P.curvature E0 F.lifetime_pos le_rfl hB hfull |
| 35 | obtain ⟨τ, K, hτ, _hK, H, hinit, _hD, _hcomplete, hcurv⟩ := |
| 36 | L.forward_flow_exists P E0 F.lifetime_pos le_rfl hB hfull gS.euclideanLeviCivitaData |
| 37 | let G := L.closedFlow P.curvature E0 F.lifetime_pos le_rfl hB hfull |
| 38 | have hmatch : H.metric 0 = G.metric F.lifetime := |
| 39 | hinit.trans (L.closedMetric_terminal P.curvature E0 F.lifetime_pos le_rfl hB hfull).symm |
| 40 | let J := FlowJoining.flow G H F.lifetime_pos hτ hmatch |
| 41 | have hpair (t : ℝ) (ht : t < F.lifetime) : |
| 42 | (⟨J.metric t, J.connection t⟩ : |
| 43 | Σ g : RiemannianMetric 3 StandardCapSpace, LeviCivitaData g) = |
| 44 | ⟨F.flow.metric t, F.flow.connection t⟩ := by |
| 45 | change FlowJoining.metricConnection G H t = ⟨F.flow.metric t, F.flow.connection t⟩ |
| 46 | exact (FlowJoining.metricConnection_of_lt G H ht).trans |
| 47 | (L.closedMetricConnection_of_lt P.curvature E0 F.lifetime_pos le_rfl hB hfull ht) |
| 48 | have hG : ∀ t ∈ Icc 0 F.lifetime, ∀ x : StandardCapSpace, |
| 49 | |(G.connection t).curvatureTensorNorm x| ≤ B := by |
| 50 | intro t ht x |
| 51 | rw [abs_of_nonneg (show 0 ≤ (G.connection t).curvatureTensorNorm x from Real.sqrt_nonneg _)] |
| 52 | exact L.closedFlow_curvatureTensorNorm_le P.curvature E0 |
| 53 | F.lifetime_pos le_rfl hB hfull ht x |
| 54 | have hbound : ∀ t ∈ Ico 0 (F.lifetime + τ), ∀ x : StandardCapSpace, |
| 55 | |(J.connection t).curvatureTensorNorm x| ≤ max B K := |
| 56 | fun _ ht x => FlowJoining.flow_abs_curvature_le G H F.lifetime_pos hτ hmatch hG hcurv ht x |
| 57 | refine ⟨F.lifetime + τ, ⟨{ |
| 58 | lifetime_gt := lt_add_of_pos_right F.lifetime hτ |
| 59 | flow := J |
| 60 | initial_metric := ?_ |
| 61 | initial_connection := ?_ |
| 62 | agrees_on_old_domain := ?_ |
| 63 | agrees_on_connection := ?_ |
| 64 | curvature_locally_bounded := ?_ }⟩⟩ |
| 65 | · exact (Sigma.mk.inj_iff.mp (hpair 0 F.lifetime_pos)).1.trans F.initial_metric |
| 66 | · exact (Sigma.mk.inj_iff.mp (hpair 0 F.lifetime_pos)).2.trans F.initial_connection |
| 67 | · exact fun _ ht => (Sigma.mk.inj_iff.mp (hpair _ ht.2)).1 |
| 68 | · exact fun _ ht => (Sigma.mk.inj_iff.mp (hpair _ ht.2)).2 |
| 69 | · intro T _hT hTend |
| 70 | refine ⟨max B K, hB.le.trans (le_max_left _ _), ?_⟩ |
| 71 | exact fun t ht x => hbound t ⟨ht.1, ht.2.trans_lt hTend⟩ x |
| 72 | |
| 73 | /-- A maximal standard-cap flow cannot have a uniform full-curvature |
| 74 | bound throughout its lifetime (Theorem 12.5, pp. 296-297). -/ |
| 75 | theorem maximalFlow_curvature_unbounded (P : M34StandardCapPredecessors) |
| 76 | {g0 : StandardInitialMetric} (E0 : StandardCapEstimate g0) |
| 77 | (F : MaximalStandardCapFlow g0) (B : ℝ) : |
| 78 | ∃ t ∈ Ico 0 F.base.lifetime, ∃ x : StandardCapSpace, |
| 79 | B < (F.connection t).curvatureTensorNorm x := by |
| 80 | by_contra hnot |
| 81 | push Not at hnot |
| 82 | have hpos : 0 < max B 0 + 1 := by positivity |
| 83 | obtain ⟨T, hE⟩ := partialFlow_extension_exists_of_curvature_bound P E0 F.base hpos |
| 84 | (fun t ht x => (hnot t ht x).trans |
| 85 | ((le_max_left B 0).trans (by linarith))) |
| 86 | exact F.maximal T hE |
| 87 | |
| 88 | /-- Curvature becomes arbitrarily large after every earlier included |
| 89 | time of a maximal standard-cap flow (Theorem 12.5, pp. 296-297). -/ |
| 90 | theorem maximalFlow_curvature_unbounded_near_lifetime (P : M34StandardCapPredecessors) |
| 91 | {g0 : StandardInitialMetric} (E0 : StandardCapEstimate g0) |
| 92 | (F : MaximalStandardCapFlow g0) {t0 : ℝ} (ht0 : t0 ∈ Ico 0 F.base.lifetime) |
| 93 | (B : ℝ) : |
| 94 | ∃ t ∈ Ioo t0 F.base.lifetime, ∃ x : StandardCapSpace, |
| 95 | B < (F.connection t).curvatureTensorNorm x := by |
| 96 | obtain ⟨K, _hK, hbound⟩ := F.base.curvature_locally_bounded t0 ht0.1 ht0.2 |
| 97 | obtain ⟨t, ht, x, hbig⟩ := maximalFlow_curvature_unbounded P E0 F (max B K) |
| 98 | have hlate : t0 < t := by |
| 99 | by_contra hnt |
| 100 | have hle := (le_abs_self _).trans (hbound t ⟨ht.1, not_lt.mp hnt⟩ x) |
| 101 | exact (not_lt_of_ge (hle.trans (le_max_right B K))) hbig |
| 102 | exact ⟨t, ⟨hlate, ht.2⟩, x, (le_max_left B K).trans_lt hbig⟩ |
| 103 | |
| 104 | end PoincareMT.M34 |