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.Blowup.Construction.PartialLimits.ExpandingWindowInput |
| 2 | import PoincareLib.Geometry.RicciFlow.Compactness.Ancient.Coordinates.Bounds |
| 3 | import PoincareLib.Analysis.Calculus.SmoothCompactness.Eventual |
| 4 | |
| 5 | /-! |
| 6 | # Retained normal-chart bounds on expanding time domains |
| 7 | |
| 8 | The original reference charts have eventual local smoothness, compact mixed |
| 9 | jet bounds, and positive coefficients at every included time of an expanding |
| 10 | source family. This is the fixed-chart estimate in Morgan--Tian, |
| 11 | Proposition 5.14 and Theorem 5.15, pp. 90--92, and Theorem 11.8, pp. 272--279. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Set Filter Metric Poincare.Analysis.Calculus |
| 17 | open scoped Manifold ContDiff Bundle Topology |
| 18 | |
| 19 | namespace PoincareMT.M30 |
| 20 | |
| 21 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 22 | FlowCarrier.isManifold FlowCarrier.t2Space |
| 23 | |
| 24 | set_option backward.isDefEq.respectTransparency false in |
| 25 | set_option synthInstance.maxHeartbeats 100000 in |
| 26 | -- The retained dependent carrier instances determine the bilinear coefficient norm. |
| 27 | /-- Global bounds on each included finite window control the original normal |
| 28 | charts on the whole open time domain. The original source indices and chart |
| 29 | maps are retained, as in Morgan--Tian, Proposition 5.14 and Theorem 5.15, |
| 30 | pp. 90--92, and Theorem 11.8, pp. 272--279. -/ |
| 31 | theorem referenceNormalChartCoefficients_on_expanding_time_domains |
| 32 | {n : ℕ} {s' s : ℝ} |
| 33 | (Href : PointedRicciFlowCompactnessHypotheses n s' s) |
| 34 | (hShi : LocalCurvatureDerivativeEstimates.{0}) |
| 35 | {J : ℕ → Set ℝ} |
| 36 | (Fseq : ∀ k, RicciFlow n (Href.sequence.carrier k).carrier (J k)) |
| 37 | (hmetric : ∀ k, (Fseq k).metric = (Href.sequence.flow k).flow.metric) |
| 38 | {W : Set ℝ} (hW : IsOpen W) (hWord : W.OrdConnected) (hzero : (0 : ℝ) ∈ W) |
| 39 | (htime : ∀ a b : ℝ, Icc a b ⊆ W → ∀ᶠ k in atTop, Icc a b ⊆ J k) |
| 40 | (hcurv : ∀ a b : ℝ, Icc a b ⊆ W → |
| 41 | ∃ C : ℝ, 0 ≤ C ∧ ∀ᶠ k in atTop, |
| 42 | ∀ t ∈ Icc a b, ∀ x : (Href.sequence.carrier k).carrier, |
| 43 | ((Fseq k).connection t).curvatureTensorNorm x ≤ C) |
| 44 | {R ρ a b : ℕ → ℝ} {N : ℕ → ℕ} |
| 45 | (cover : ∀ k j, j ≤ k → |
| 46 | NormalChartCover (Href.sequence.flow k).flow.metric |
| 47 | (Href.sequence.flow k).base s' s ((j : ℝ) + 1) |
| 48 | (R j) (ρ j) (a j) (b j) (N j)) |
| 49 | (hρ : ∀ j, 0 < ρ j) (hρR : ∀ j, 2 * ρ j < R j) |
| 50 | (ha : ∀ j, 0 < a j) (hb : ∀ j, 0 < b j) : |
| 51 | ∀ i : ℕ, |
| 52 | let raw := fun k (z : ℝ × EuclideanSpace ℝ (Fin n)) => |
| 53 | ((Href.sequence.flow k).flow.metric z.1).pullbackCoefficients |
| 54 | ((cover k (min (Nat.unpair i).1 k) (min_le_right _ _)).chart |
| 55 | ⟨(Nat.unpair i).2 % (N (min (Nat.unpair i).1 k) + 1), |
| 56 | Nat.mod_lt _ (Nat.succ_pos _)⟩) z.2 |
| 57 | LocallyEventuallyContDiff |
| 58 | (W ×ˢ ball (0 : EuclideanSpace ℝ (Fin n)) (ρ (Nat.unpair i).1)) raw ∧ |
| 59 | (∀ K : Set (ℝ × EuclideanSpace ℝ (Fin n)), IsCompact K → |
| 60 | K ⊆ W ×ˢ ball 0 (ρ (Nat.unpair i).1) → ∀ d : ℕ, ∃ B : ℝ, |
| 61 | ∀ᶠ k in atTop, ∀ z ∈ K, ‖iteratedFDeriv ℝ d (raw k) z‖ ≤ B) ∧ |
| 62 | (∀ t ∈ W, ∃ c : ℝ, 0 < c ∧ ∀ᶠ k in atTop, |
| 63 | ∀ x ∈ ball 0 (ρ (Nat.unpair i).1), ∀ v, |
| 64 | c * ‖v‖ ^ 2 ≤ raw k (t, x) v v) := by |
| 65 | classical |
| 66 | have hwindow (I : Set ℝ) (hI : IsCompact I) (hIW : I ⊆ W) : |
| 67 | ∃ l r : ℝ, (l < 0 ∧ 0 < r) ∧ Icc l r ⊆ W ∧ I ⊆ Ioo l r := by |
| 68 | obtain ⟨m, hm⟩ := (hI.insert 0).exists_isLeast (insert_nonempty 0 I) |
| 69 | obtain ⟨M, hM⟩ := (hI.insert 0).exists_isGreatest (insert_nonempty 0 I) |
| 70 | have hmW : m ∈ W := by |
| 71 | rcases hm.1 with rfl | hmI |
| 72 | · exact hzero |
| 73 | · exact hIW hmI |
| 74 | have hMW : M ∈ W := by |
| 75 | rcases hM.1 with rfl | hMI |
| 76 | · exact hzero |
| 77 | · exact hIW hMI |
| 78 | obtain ⟨l, l', _, hlh, hlW⟩ := |
| 79 | exists_Icc_mem_subset_of_mem_nhds (hW.mem_nhds hmW) |
| 80 | obtain ⟨r', r, _, hrh, hrW⟩ := |
| 81 | exists_Icc_mem_subset_of_mem_nhds (hW.mem_nhds hMW) |
| 82 | have hl : m ∈ Ioo l l' := Icc_mem_nhds_iff.mp hlh |
| 83 | have hr : M ∈ Ioo r' r := Icc_mem_nhds_iff.mp hrh |
| 84 | refine ⟨l, r, ⟨hl.1.trans_le (hm.2 (mem_insert 0 I)), |
| 85 | (hM.2 (mem_insert 0 I)).trans_lt hr.2⟩, |
| 86 | hWord.out (hlW ⟨le_rfl, (hl.1.trans hl.2).le⟩) |
| 87 | (hrW ⟨(hr.1.trans hr.2).le, le_rfl⟩), ?_⟩ |
| 88 | intro t ht |
| 89 | exact ⟨hl.1.trans_le (hm.2 (mem_insert_of_mem 0 ht)), |
| 90 | (hM.2 (mem_insert_of_mem 0 ht)).trans_lt hr.2⟩ |
| 91 | have hwide {l r : ℝ} (hlr : l < 0 ∧ 0 < r) (hIW : Icc l r ⊆ W) : |
| 92 | ∃ (q : ℕ) (hsub : ∀ k, Ioo l r ⊆ J (k + q)), |
| 93 | ∃ H : PointedRicciFlowCompactnessHypotheses n l r, |
| 94 | H.sequence = sourceWindowSequence Href.sequence.carrier Fseq |
| 95 | (fun k => (Href.sequence.flow k).base) q hsub (hlr.1.trans hlr.2) := by |
| 96 | obtain ⟨C, hC, hbound⟩ := hcurv l r hIW |
| 97 | apply exists_expanding_source_window_compactness Href Fseq |
| 98 | (fun k => congrFun (hmetric k) 0) hlr (htime l r hIW) |
| 99 | exact ⟨C, hC, hbound.mono (fun k hk t ht x => hk t ⟨ht.1.le, ht.2.le⟩ x)⟩ |
| 100 | have hwideMetric {l r : ℝ} (q : ℕ) |
| 101 | (hsub : ∀ k, Ioo l r ⊆ J (k + q)) (hlr : l < r) (k : ℕ) : |
| 102 | ((sourceWindowSequence Href.sequence.carrier Fseq |
| 103 | (fun k => (Href.sequence.flow k).base) q hsub hlr).flow k).metricAt = |
| 104 | (Href.sequence.flow (k + q)).flow.metric := hmetric (k + q) |
| 105 | have unshift (q : ℕ) (P : ℕ → Prop) |
| 106 | (hP : ∀ᶠ k in atTop, P (k + q)) : ∀ᶠ k in atTop, P k := by |
| 107 | have hmap : ∀ᶠ k in Filter.map (fun k : ℕ => k + q) atTop, P k := |
| 108 | Filter.eventually_map.mpr hP |
| 109 | simpa only [Filter.map_add_atTop_eq_nat] using hmap |
| 110 | intro i |
| 111 | let j := (Nat.unpair i).1 |
| 112 | let index (l : ℕ) : Fin (N l + 1) := |
| 113 | ⟨(Nat.unpair i).2 % (N l + 1), Nat.mod_lt _ (Nat.succ_pos _)⟩ |
| 114 | let rawStage := fun k l (hlk : l ≤ k) (z : ℝ × EuclideanSpace ℝ (Fin n)) => |
| 115 | ((Href.sequence.flow k).flow.metric z.1).pullbackCoefficients |
| 116 | ((cover k l hlk).chart (index l)) z.2 |
| 117 | let raw := fun k => rawStage k (min j k) (min_le_right _ _) |
| 118 | have hraw (k : ℕ) (hk : j ≤ k) : raw k = rawStage k j hk := by |
| 119 | funext z |
| 120 | simp only [raw, min_eq_left hk] |
| 121 | change LocallyEventuallyContDiff (W ×ˢ ball 0 (ρ j)) raw ∧ |
| 122 | (∀ K : Set (ℝ × EuclideanSpace ℝ (Fin n)), IsCompact K → |
| 123 | K ⊆ W ×ˢ ball 0 (ρ j) → ∀ d : ℕ, ∃ B : ℝ, |
| 124 | ∀ᶠ k in atTop, ∀ z ∈ K, ‖iteratedFDeriv ℝ d (raw k) z‖ ≤ B) ∧ |
| 125 | (∀ t ∈ W, ∃ c : ℝ, 0 < c ∧ ∀ᶠ k in atTop, |
| 126 | ∀ x ∈ ball 0 (ρ j), ∀ v, c * ‖v‖ ^ 2 ≤ raw k (t, x) v v) |
| 127 | refine ⟨?_, ?_, ?_⟩ |
| 128 | · intro K hK hKW |
| 129 | have hIW : Prod.fst '' K ⊆ W := by |
| 130 | rintro t ⟨z, hz, rfl⟩ |
| 131 | exact (hKW hz).1 |
| 132 | obtain ⟨l, r, hlr, hlrW, hIlr⟩ := |
| 133 | hwindow (Prod.fst '' K) (hK.image continuous_fst) hIW |
| 134 | obtain ⟨q, hsub, H, hH⟩ := hwide hlr hlrW |
| 135 | have hsmooth := H.referenceNormalChartCover_contDiffOn |
| 136 | (S' := s') (S := s) (A := (j : ℝ) + 1) (R := R j) (ρ := ρ j) |
| 137 | (a := a j) (b := b j) (N := N j) |
| 138 | rw [hH] at hsmooth |
| 139 | apply unshift q |
| 140 | filter_upwards [(Filter.tendsto_add_atTop_nat q).eventually |
| 141 | (eventually_ge_atTop j)] with k hk |
| 142 | refine ⟨Ioo l r ×ˢ ball 0 (R j), isOpen_Ioo.prod isOpen_ball, ?_, ?_⟩ |
| 143 | · intro z hz |
| 144 | exact ⟨hIlr (mem_image_of_mem Prod.fst hz), |
| 145 | ball_subset_ball (show ρ j ≤ R j by linarith [hρ j, hρR j]) (hKW hz).2⟩ |
| 146 | · have hsmoothk := hsmooth k |
| 147 | rw [hwideMetric] at hsmoothk |
| 148 | rw [hraw (k + q) hk] |
| 149 | exact hsmoothk (cover (k + q) j hk) (index j) |
| 150 | · intro K hK hKW d |
| 151 | have hIW : Prod.fst '' K ⊆ W := by |
| 152 | rintro t ⟨z, hz, rfl⟩ |
| 153 | exact (hKW hz).1 |
| 154 | obtain ⟨l, r, hlr, hlrW, hIlr⟩ := |
| 155 | hwindow (Prod.fst '' K) (hK.image continuous_fst) hIW |
| 156 | obtain ⟨q, hsub, H, hH⟩ := hwide hlr hlrW |
| 157 | obtain ⟨B, _, hbound⟩ := H.eventually_referenceNormalChartCover_spacetime_jet_bound |
| 158 | hShi Href.time_bounds (hK.image continuous_fst) hIlr (N := N j) |
| 159 | (show 0 < (j : ℝ) + 1 by positivity) (hρ j) (hρR j) (ha j) (hb j) d |
| 160 | rw [hH] at hbound |
| 161 | refine ⟨B, unshift q _ ?_⟩ |
| 162 | filter_upwards [hbound, (Filter.tendsto_add_atTop_nat q).eventually |
| 163 | (eventually_ge_atTop j)] with k hk hkj z hz |
| 164 | rw [hwideMetric] at hk |
| 165 | have h := hk (cover (k + q) j hkj) (index j) z.1 |
| 166 | (mem_image_of_mem Prod.fst hz) z.2 (ball_subset_closedBall (hKW hz).2) |
| 167 | rw [hraw (k + q) hkj] |
| 168 | exact h |
| 169 | · intro t ht |
| 170 | obtain ⟨l, r, hlr, hlrW, htlr⟩ := |
| 171 | hwindow {t} isCompact_singleton (singleton_subset_iff.mpr ht) |
| 172 | obtain ⟨q, hsub, H, hH⟩ := hwide hlr hlrW |
| 173 | obtain ⟨c, _, hc, _, hbound⟩ := H.eventually_referenceNormalChartCover_ellipticity |
| 174 | Href.time_bounds (N := N j) (show 0 < (j : ℝ) + 1 by positivity) |
| 175 | (hρ j) (hρR j) (ha j) (hb j) |
| 176 | rw [hH] at hbound |
| 177 | refine ⟨c, hc, unshift q _ ?_⟩ |
| 178 | filter_upwards [hbound, (Filter.tendsto_add_atTop_nat q).eventually |
| 179 | (eventually_ge_atTop j)] with k hk hkj x hx v |
| 180 | rw [hwideMetric] at hk |
| 181 | have hx' : x ∈ closedBall (0 : EuclideanSpace ℝ (Fin n)) (2 * ρ j) := |
| 182 | closedBall_subset_closedBall (by linarith [hρ j]) (ball_subset_closedBall hx) |
| 183 | have h := (hk (cover (k + q) j hkj) (index j) t (htlr (mem_singleton t)) x hx' v).1 |
| 184 | rw [hraw (k + q) hkj] |
| 185 | exact h |
| 186 | |
| 187 | end PoincareMT.M30 |