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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Regular.TerminalRegularCountableAtlas |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Terminal.Source.TerminalSourceCountableChartFlow |
| 4 | |
| 5 | /-! |
| 6 | # Included chart flows of the actual regular terminal atlas |
| 7 | |
| 8 | The selected physical stages supply the source metrics, coefficient |
| 9 | identities and closed lower bounds for the unchanged extracted jets. |
| 10 | Each chart retains its own positive lifetime and literal terminal metric. |
| 11 | MT Proposition 5.14; terminal-regular-finite-germs.md, I2. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | set_option maxSynthPendingDepth 12 |
| 17 | |
| 18 | open Set Filter TopologicalSpace Poincare.Gluing |
| 19 | open scoped Manifold ContDiff Topology NNReal |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M47 |
| 24 | |
| 25 | local notation "E" => EuclideanSpace ℝ (Fin 3) |
| 26 | local notation "Bilin" => E →L[ℝ] E →L[ℝ] ℝ |
| 27 | |
| 28 | section Family |
| 29 | |
| 30 | variable (S : RepairedControlledSchedulesData.{u}) |
| 31 | (B : M47ComponentAnalyticBounds.{u} S.setup.C) (p : SurgeryParameterPrefix S.constants) |
| 32 | (F : ℕ → SurgeryFlowData.{u}) (O : ∀ k, SurgeryObservation (F k)) |
| 33 | (W : ∀ k, M33RegularHistoryWindow (F k)) (H : ∀ k, M33RegularHistoryData (W k)) |
| 34 | (base Q r A tau0 tau K L R rho : ℕ → ℝ) (N : ℕ → ℕ) |
| 35 | (center : ∀ k, ((F k).slice (base k)).carrier) |
| 36 | (data : ∀ k j, j ≤ k → TerminalRegularStageData S B p (O k) (H k) |
| 37 | (base k) (Q k) (r k) (A j) (tau0 j) (tau j) (K j) (L j) |
| 38 | ((j : ℝ) + 1) (R j) (rho j) (N j) (center k)) |
| 39 | (hrho : ∀ j, 0 < rho j) |
| 40 | |
| 41 | local notation "label" => terminalSourceCountableLabel N |
| 42 | local notation "U" => (fun n => terminalSourceCountableDomain (rho (Sigma.fst (label n)))) |
| 43 | local notation "Uset" => (fun n => (U n : Set E)) |
| 44 | local notation "hU" => (fun n => TopologicalSpace.Opens.isOpen (U n)) |
| 45 | local notation "g" => (fun k : ℕ => RiemannianMetric.connectedComponentMetric |
| 46 | (M13.scaleSmoothMetric (SurgeryFlowData.metric (F k) (base k)) (Q k) |
| 47 | (SurgeryFlowCylinder.scale_pos (TerminalRegularStageData.original (data k 0 (Nat.zero_le k))))) |
| 48 | (center k)) |
| 49 | local notation "e" => (fun (k j : ℕ) (hjk : j ≤ k) => TerminalRegularStageData.maps (data k j hjk)) |
| 50 | local notation "total" => (fun k n => terminalSourceCountableMap hrho e k |
| 51 | (Sigma.fst (label n)) (Sigma.snd (label n))) |
| 52 | local notation "f0" => (fun n k => RiemannianMetric.pullbackCoefficients (g k) |
| 53 | (ChartDistance.chartParametrization Uset hU (total k n))) |
| 54 | local notation "src" => (fun (j : ℕ) (a : {k : ℕ // j ≤ k}) => |
| 55 | terminalRegularStageSource (F (Subtype.val a)) (base (Subtype.val a)) (Q (Subtype.val a)) |
| 56 | (A j) (center (Subtype.val a))) |
| 57 | local notation "flow" => (fun (j : ℕ) (a : {k : ℕ // j ≤ k}) => |
| 58 | TerminalRegularStageData.flow (data (Subtype.val a) j (Subtype.property a))) |
| 59 | local notation "chart" => (fun (j : ℕ) (a : {k : ℕ // j ≤ k}) => |
| 60 | TerminalSourceIndexedChartCover.chart |
| 61 | (TerminalRegularStageData.cover (data (Subtype.val a) j (Subtype.property a)))) |
| 62 | |
| 63 | /-- Actual stage flows realize the same extracted terminal and backward |
| 64 | coefficients on the original countable charts, with included endpoints. -/ |
| 65 | theorem terminalSource_regular_chart_flows |
| 66 | (P : M46Predecessors.{u}) (htau : ∀ j, 0 < tau j) |
| 67 | (hrhoR : ∀ j, 2 * rho j < R j) |
| 68 | (hsmall : ∀ j s, |s| ≤ 2 * rho j → |
| 69 | ((13 * max (4 * L j / 3) 1) * s ^ 2) * |
| 70 | Real.exp (max 1 ((13 * max (4 * L j / 3) 1) * s ^ 2)) ≤ 3) |
| 71 | {sigma : ℕ → ℕ} (hsigma : StrictMono sigma) |
| 72 | (B0 : ℕ → E → Bilin) (Bminus : ℕ → ℝ × E → Bilin) |
| 73 | (hB0 : ∀ n, ContDiffOn ℝ ∞ (B0 n) (U n)) |
| 74 | (hminus : ∀ n, ContDiffOn ℝ ∞ (Bminus n) |
| 75 | (Ioo (-(tau (label n).1 / 2)) 0 ×ˢ (U n : Set E))) : |
| 76 | letI : ∀ n, Nonempty (U n) := fun n => ⟨terminalSourceCountableZero (hrho (label n).1)⟩ |
| 77 | letI : ∀ n, ChartedSpace E (U n) := |
| 78 | fun n => (U n).isOpen.isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 79 | letI : ∀ n, IsManifold (𝓡 3) ∞ (U n) := |
| 80 | fun n => (U n).isOpen.isOpenEmbedding_subtypeVal.isManifold_singleton |
| 81 | ∀ |
| 82 | (_hzero : ∀ n C, IsCompact C → C ⊆ U n → TendstoUniformlyOn |
| 83 | (fun k => iteratedFDeriv ℝ 0 (f0 n (sigma k))) |
| 84 | (iteratedFDeriv ℝ 0 (B0 n)) atTop C) |
| 85 | (_hnegative : ∀ n m C, IsCompact C → |
| 86 | C ⊆ Ioo (-(tau (label n).1 / 2)) 0 ×ˢ (U n : Set E) → TendstoUniformlyOn |
| 87 | (fun k => iteratedFDeriv ℝ m (terminalSourceCountableNegative (label n).1 |
| 88 | (fun a => (src (label n).1 a : Type u)) (flow (label n).1) |
| 89 | (fun a => chart (label n).1 a (label n).2) (f0 n) (sigma k))) |
| 90 | (iteratedFDeriv ℝ m (Bminus n)) atTop C) |
| 91 | (g0 : ∀ n, CanonicalMetric Uset hU n) |
| 92 | (_hterminal : ∀ n (x : U n) v w, (g0 n).inner x v w = B0 n x v w), |
| 93 | ∃ G : ∀ n, RicciFlow 3 (U n) (Icc (-(tau (label n).1 / 4)) 0), |
| 94 | (∀ n, (G n).metric 0 = g0 n) ∧ |
| 95 | ∀ n t, t ∈ Icc (-(tau (label n).1 / 4)) 0 → ∀ (x : U n) v w, |
| 96 | ((G n).metric t).inner x v w = |
| 97 | (if t < 0 then Bminus n (t, x) else B0 n x) v w := by |
| 98 | classical |
| 99 | let : ∀ n, Nonempty (U n) := fun n => ⟨terminalSourceCountableZero (hrho (label n).1)⟩ |
| 100 | let : ∀ n, ChartedSpace E (U n) := |
| 101 | fun n => (U n).isOpen.isOpenEmbedding_subtypeVal.singletonChartedSpace |
| 102 | let : ∀ n, IsManifold (𝓡 3) ∞ (U n) := |
| 103 | fun n => (U n).isOpen.isOpenEmbedding_subtypeVal.isManifold_singleton |
| 104 | dsimp only |
| 105 | intro hzero hnegative g0 hterminal |
| 106 | let cyl := fun (j : ℕ) (a : {k : ℕ // j ≤ k}) => (data a.val j a.property).cylinder |
| 107 | have hGood (j : ℕ) (i : Fin (N j + 1)) : |
| 108 | ∀ᶠ a in Filter.comap (Subtype.val : {k : ℕ // j ≤ k} → ℕ) atTop, |
| 109 | TerminalSourceJetsG4Good S B p (O a.val) (H a.val) (src j a) (cyl j a) (flow j a) |
| 110 | (rNext := r a.val) (L := L j) (eta := 1) (chart j a i) := |
| 111 | Filter.Eventually.of_forall (fun a => (data a.val j a.property).good i) |
| 112 | have hUR (n : ℕ) : (U n : Set E) ⊆ Metric.ball 0 (R (label n).1) := |
| 113 | Metric.ball_subset_ball (by linarith [hrho (label n).1, hrhoR (label n).1]) |
| 114 | have hread (n : ℕ) (a : {k : ℕ // (label n).1 ≤ k}) : |
| 115 | EqOn (f0 n a.val) (((flow (label n).1 a).metric 0).pullbackCoefficients |
| 116 | (chart (label n).1 a (label n).2).chart) (U n) := by |
| 117 | let : ChartedSpace E (U n) := (U n).instChartedSpace |
| 118 | dsimp only |
| 119 | rw [terminalSourceCountableMap_good hrho e a.property] |
| 120 | exact terminalSourceCountable_pullback_readout U (g a.val) |
| 121 | ((flow (label n).1 a).metric 0) |
| 122 | ((data a.val (label n).1 a.property).geometry (label n).2).2.contMDiff |
| 123 | (chart (label n).1 a (label n).2).chart |
| 124 | ((chart (label n).1 a (label n).2).smooth.mono (hUR n)) |
| 125 | ((data a.val (label n).1 a.property).map_metric (label n).2) |
| 126 | have hz (n : ℕ) (x : E) (hx : x ∈ U n) : |
| 127 | Tendsto (fun k => f0 n (sigma k) x) atTop (𝓝 (B0 n x)) := by |
| 128 | have h := (hzero n {x} isCompact_singleton (singleton_subset_iff.mpr hx)).tendsto_at |
| 129 | (mem_singleton x) |
| 130 | have heval := ((ContinuousMultilinearMap.uniformContinuous_eval_const |
| 131 | (𝕜 := ℝ) (0 : Fin 0 → E)).continuous.tendsto _).comp h |
| 132 | simpa only [Function.comp_def, iteratedFDeriv_zero_apply] using heval |
| 133 | have hflow (n : ℕ) : ∃ G : RicciFlow 3 (U n) (Icc (-(tau (label n).1 / 4)) 0), |
| 134 | G.metric 0 = g0 n ∧ ∀ t ∈ Icc (-(tau (label n).1 / 4)) 0, ∀ (x : U n) v w, |
| 135 | (G.metric t).inner x v w = |
| 136 | (if t < 0 then Bminus n (t, x) else B0 n x) v w := by |
| 137 | let j := (label n).1 |
| 138 | let i := (label n).2 |
| 139 | let coeff := fun z : ℝ × E => if z.1 < 0 then Bminus n z else B0 n z.2 |
| 140 | have hclosed := terminalSourceCountable_g4_closed_limit j S B p P |
| 141 | (htau j) (hrho j) (hrhoR j) (hsmall j) |
| 142 | (fun a => F a.val) (fun a => O a.val) (fun a => W a.val) (fun a => H a.val) |
| 143 | (fun a => (F a.val).slice (base a.val)) |
| 144 | (fun a => base a.val) (fun a => Q a.val) (fun a => r a.val) |
| 145 | (src j) (cyl j) (flow j) (fun a => chart j a i) (hGood j i) |
| 146 | (f0 n) (hread n) hsigma (B0 n) (Bminus n) (hB0 n) (hminus n) (hz n) (hnegative n) |
| 147 | have hbound := (terminalSourceCountable_g4_closed_bounds j S B p P |
| 148 | (htau j) (hrho j) (hrhoR j) (hsmall j) |
| 149 | (fun a => F a.val) (fun a => O a.val) (fun a => W a.val) (fun a => H a.val) |
| 150 | (fun a => (F a.val).slice (base a.val)) |
| 151 | (fun a => base a.val) (fun a => Q a.val) (fun a => r a.val) |
| 152 | (src j) (cyl j) (flow j) (fun a => chart j a i) (hGood j i) |
| 153 | (f0 n) (hread n)).1 |
| 154 | apply terminalSourceCountable_chart_flow U n j (fun a => (src j a : Type u)) |
| 155 | (htau j) (hUR n) (flow j) (fun a => chart j a i) (f0 n) hsigma |
| 156 | coeff hclosed.1 hclosed.2.1 ?_ hclosed.2.2 (g0 n) ?_ |
| 157 | · intro t ht x hx |
| 158 | refine ⟨terminalSourceLower (13 * max (4 * L j / 3) 1) (tau j), |
| 159 | terminalSourceLower_pos _ _, ?_⟩ |
| 160 | filter_upwards [hsigma.tendsto_atTop.eventually hbound] with k hk v |
| 161 | exact hk t ⟨by linarith [htau j, ht.1], ht.2⟩ x hx v |
| 162 | · intro x v w |
| 163 | simpa only [coeff, lt_self_iff_false, if_false] using hterminal n x v w |
| 164 | choose G hG hcoeff using hflow |
| 165 | exact ⟨G, hG, hcoeff⟩ |
| 166 | |
| 167 | end Family |
| 168 | |
| 169 | end PoincareMT.M47 |