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.Local.Theory |
| 2 | import Mathlib.Order.ConditionallyCompleteLattice.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Uniform-time ordinary-flow existence |
| 6 | |
| 7 | Morgan--Tian Theorem 3.11, p. 39, Proposition 4.12, p. 68, and Claim 15.1, |
| 8 | p. 353. Uniqueness glues all shorter flows up to the supremum of their |
| 9 | lifetimes. Continuation then rules out a bounded lifetime under the supplied |
| 10 | uniform curvature estimate. See the owned InitialContinuation derivation. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M45 |
| 21 | |
| 22 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 23 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 24 | |
| 25 | /-- Uniqueness glues initial flows covering every time below a positive |
| 26 | endpoint. Theorem 3.11, p. 39, in the continuation argument of p. 68. -/ |
| 27 | theorem exists_flow_of_initial_cover |
| 28 | (hunique : RicciFlowUniqueness n M) (g₀ : RiemannianMetric n M) |
| 29 | {S : ℝ} (hS : 0 < S) |
| 30 | (hcover : ∀ t ∈ Ico 0 S, ∃ T : ℝ, t < T ∧ 0 < T ∧ |
| 31 | ∃ F : RicciFlow n M (Ico 0 T), F.metric 0 = g₀) : |
| 32 | ∃ F : RicciFlow n M (Ico 0 S), F.metric 0 = g₀ := by |
| 33 | classical |
| 34 | choose tau htime hpos flow hinit using hcover |
| 35 | have hzero : (0 : ℝ) ∈ Ico 0 S := ⟨le_rfl, hS⟩ |
| 36 | let d (t : ℝ) : (T : ℝ) × RicciFlow n M (Ico 0 T) := |
| 37 | if ht : t ∈ Ico 0 S then ⟨tau t ht, flow t ht⟩ |
| 38 | else ⟨tau 0 hzero, flow 0 hzero⟩ |
| 39 | have hd (t : ℝ) (ht : t ∈ Ico 0 S) : |
| 40 | 0 < (d t).1 ∧ t < (d t).1 ∧ (d t).2.metric 0 = g₀ := by |
| 41 | have hdt : d t = ⟨tau t ht, flow t ht⟩ := dif_pos ht |
| 42 | rw [hdt] |
| 43 | exact ⟨hpos t ht, htime t ht, hinit t ht⟩ |
| 44 | let g (t : ℝ) := (d t).2.metric t |
| 45 | have heq (s t : ℝ) (hs : s ∈ Ico 0 S) (ht : t ∈ Ico 0 S) |
| 46 | (hst : s < (d t).1) : g s = (d t).2.metric s := by |
| 47 | apply hunique (Ico 0 (d s).1) (Ico 0 (d t).1) (d s).2 (d t).2 |
| 48 | ⟨⟨le_rfl, (hd s hs).1⟩, fun _ hx => hx.1⟩ |
| 49 | ⟨⟨le_rfl, (hd t ht).1⟩, fun _ hx => hx.1⟩ |
| 50 | ((hd s hs).2.2.trans (hd t ht).2.2.symm) |
| 51 | exact ⟨⟨hs.1, (hd s hs).2.1⟩, ⟨hs.1, hst⟩⟩ |
| 52 | let F : RicciFlow n M (Ico 0 S) := |
| 53 | { metric := g |
| 54 | connection := fun t => (d t).2.connection t |
| 55 | interval := ordConnected_Ico |
| 56 | nontrivial := ⟨0, hzero, S / 2, ⟨by linarith, by linarith⟩, by linarith⟩ |
| 57 | smooth := by |
| 58 | intro p hp |
| 59 | have hnear : Ico 0 (d p.1).1 ×ˢ (univ : Set M) ∈ |
| 60 | 𝓝[Ico 0 S ×ˢ univ] p := by |
| 61 | have hlt := (continuous_fst.tendsto p).eventually |
| 62 | (gt_mem_nhds (hd p.1 hp.1).2.1) |
| 63 | filter_upwards [self_mem_nhdsWithin, |
| 64 | hlt.filter_mono nhdsWithin_le_nhds] with q hq hqt |
| 65 | exact ⟨⟨hq.1.1, hqt⟩, mem_univ _⟩ |
| 66 | have hsm := (d p.1).2.smooth p |
| 67 | ⟨⟨hp.1.1, (hd p.1 hp.1).2.1⟩, mem_univ _⟩ |
| 68 | apply (hsm.mono_of_mem_nhdsWithin hnear).congr_of_eventuallyEq_of_mem _ hp |
| 69 | filter_upwards [self_mem_nhdsWithin, hnear] with q hq hqt |
| 70 | rw [heq q.1 p.1 hq.1 hp.1 hqt.1.2] |
| 71 | equation := by |
| 72 | intro t ht x v w |
| 73 | have hnear : Ico 0 (d t).1 ∈ 𝓝[Ico 0 S] t := by |
| 74 | filter_upwards [self_mem_nhdsWithin, |
| 75 | (gt_mem_nhds (hd t ht).2.1).filter_mono nhdsWithin_le_nhds] with s hs hst |
| 76 | exact ⟨hs.1, hst⟩ |
| 77 | have hderiv := (d t).2.equation t ⟨ht.1, (hd t ht).2.1⟩ x v w |
| 78 | apply (hderiv.mono_of_mem_nhdsWithin hnear).congr_of_eventuallyEq _ rfl |
| 79 | filter_upwards [self_mem_nhdsWithin, hnear] with s hs hst |
| 80 | rw [heq s t hs ht hst.2] } |
| 81 | exact ⟨F, (hd 0 hzero).2.2⟩ |
| 82 | |
| 83 | /-- A uniform curvature bound on all short initial flows forces existence |
| 84 | beyond the given time. Proposition 4.12, p. 68, as used in Claim 15.1. -/ |
| 85 | theorem exists_long_flow_of_uniform_curvature |
| 86 | (hlocal : RicciFlowLocalTheory n M) (g₀ : RiemannianMetric n M) |
| 87 | {B C : ℝ} |
| 88 | (hbound : ∀ T : ℝ, 0 < T → T ≤ B → |
| 89 | ∀ F : RicciFlow n M (Ico 0 T), F.metric 0 = g₀ → |
| 90 | ∀ t ∈ Ico 0 T, ∀ x : M, (F.connection t).curvatureTensorNorm x ≤ C) : |
| 91 | ∃ T : ℝ, B < T ∧ 0 < T ∧ |
| 92 | ∃ F : RicciFlow n M (Ico 0 T), F.metric 0 = g₀ := by |
| 93 | classical |
| 94 | by_contra hno |
| 95 | let E : Set ℝ := {T | 0 < T ∧ |
| 96 | ∃ F : RicciFlow n M (Ico 0 T), F.metric 0 = g₀} |
| 97 | obtain ⟨T₀, hT₀, F₀, hF₀⟩ := hlocal.1 g₀ |
| 98 | have hE : T₀ ∈ E := ⟨hT₀, F₀, hF₀⟩ |
| 99 | have hupper : ∀ T ∈ E, T ≤ B := by |
| 100 | intro T hT |
| 101 | by_contra hle |
| 102 | exact hno ⟨T, lt_of_not_ge hle, hT⟩ |
| 103 | have hbdd : BddAbove E := ⟨B, hupper⟩ |
| 104 | have hS : 0 < sSup E := hT₀.trans_le (le_csSup hbdd hE) |
| 105 | have hSB : sSup E ≤ B := csSup_le ⟨T₀, hE⟩ hupper |
| 106 | obtain ⟨F, hF⟩ := exists_flow_of_initial_cover hlocal.2.1 g₀ hS (by |
| 107 | intro t ht |
| 108 | obtain ⟨T, hT, htT⟩ := exists_lt_of_lt_csSup ⟨T₀, hE⟩ ht.2 |
| 109 | exact ⟨T, htT, hT⟩) |
| 110 | obtain ⟨T', hT', F', hFF'⟩ := hlocal.2.2 (sSup E) hS F |
| 111 | ⟨C, hbound (sSup E) hS hSB F hF⟩ |
| 112 | have hF' : F'.metric 0 = g₀ := (hFF' ⟨le_rfl, hS⟩).symm.trans hF |
| 113 | exact (not_lt_of_ge (le_csSup hbdd ⟨hS.trans hT', F', hF'⟩)) hT' |
| 114 | |
| 115 | end PoincareMT.M45 |