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.Analysis.Calculus.SmoothCompactness |
| 2 | import PoincareLib.Analysis.Calculus.Diffeomorphism.Perturbation |
| 3 | import Mathlib.Analysis.Calculus.ContDiff.Bounds |
| 4 | import Mathlib.Topology.MetricSpace.Thickening |
| 5 | |
| 6 | /-! |
| 7 | # Local derivative bounds under coordinate operations |
| 8 | |
| 9 | Compact-set derivative bounds survive fixed smooth changes of coordinates and |
| 10 | cutoff multiplication. Only eventual local smoothness of the varying family |
| 11 | is needed. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | open Set Filter |
| 16 | open scoped ContDiff Topology |
| 17 | |
| 18 | namespace Poincare.Analysis.Calculus |
| 19 | |
| 20 | theorem exists_compact_target_of_tendstoUniformlyOn |
| 21 | {X Y : Type*} [TopologicalSpace X] [MetricSpace Y] [LocallyCompactSpace Y] |
| 22 | {K : Set X} (hK : IsCompact K) {U : Set Y} (hU : IsOpen U) |
| 23 | {g : X → Y} (hg : ContinuousOn g K) (hgU : MapsTo g K U) |
| 24 | {gseq : ℕ → X → Y} (hconv : TendstoUniformlyOn gseq g atTop K) : |
| 25 | ∃ T : Set Y, IsCompact T ∧ T ⊆ U ∧ ∀ᶠ k in atTop, MapsTo (gseq k) K T := by |
| 26 | obtain ⟨T, hT, _, hgT, hTU⟩ := exists_compact_closed_between |
| 27 | (hK.image_of_continuousOn hg) hU (image_subset_iff.mpr hgU) |
| 28 | obtain ⟨ε, hε, hεT⟩ := (hK.image_of_continuousOn hg).exists_thickening_subset_open |
| 29 | isOpen_interior hgT |
| 30 | refine ⟨T, hT, hTU, ?_⟩ |
| 31 | filter_upwards [Metric.tendstoUniformlyOn_iff.mp hconv ε hε] with k hk x hx |
| 32 | apply interior_subset (hεT (Metric.mem_thickening_iff.mpr ?_)) |
| 33 | exact ⟨g x, mem_image_of_mem g hx, by simpa only [dist_comm] using hk x hx⟩ |
| 34 | |
| 35 | variable {E F G : Type*} |
| 36 | [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 37 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 38 | [NormedAddCommGroup G] [NormedSpace ℝ G] |
| 39 | |
| 40 | theorem norm_iteratedFDeriv_comp_le_of_contDiffAt |
| 41 | {f : E → F} {g : F → G} {x : E} |
| 42 | (hf : ContDiffAt ℝ ∞ f x) (hg : ContDiffAt ℝ ∞ g (f x)) |
| 43 | (m : ℕ) {A B : ℝ} |
| 44 | (hA : ∀ l, l ≤ m → ‖iteratedFDeriv ℝ l g (f x)‖ ≤ A) |
| 45 | (hB : ∀ l, 1 ≤ l → l ≤ m → ‖iteratedFDeriv ℝ l f x‖ ≤ B ^ l) : |
| 46 | ‖iteratedFDeriv ℝ m (g ∘ f) x‖ ≤ m.factorial * A * B ^ m := by |
| 47 | obtain ⟨s, hs, hfs⟩ := hf.contDiffOn (m := (m : ℕ∞ω)) (by exact_mod_cast le_top) (by simp) |
| 48 | obtain ⟨t, ht, hgt⟩ := hg.contDiffOn (m := (m : ℕ∞ω)) (by exact_mod_cast le_top) (by simp) |
| 49 | obtain ⟨s', hs's, hs'o, hxs'⟩ := mem_nhds_iff.mp hs |
| 50 | obtain ⟨t', ht't, ht'o, hft'⟩ := mem_nhds_iff.mp ht |
| 51 | obtain ⟨v, hv, hvo, hxv⟩ := mem_nhds_iff.mp |
| 52 | (inter_mem (hs'o.mem_nhds hxs') (hf.continuousAt.preimage_mem_nhds (ht'o.mem_nhds hft'))) |
| 53 | have hmap : MapsTo f v t' := fun _ hx => (hv hx).2 |
| 54 | have hb := norm_iteratedFDerivWithin_comp_le (hgt.mono ht't) |
| 55 | (hfs.mono (fun _ hy => hs's (hv hy).1)) (le_refl (m : ℕ∞ω)) |
| 56 | ht'o.uniqueDiffOn hvo.uniqueDiffOn hmap hxv |
| 57 | (C := A) (D := B) (fun l hl => ?_) (fun l hl hlm => ?_) |
| 58 | · simpa only [iteratedFDerivWithin_of_isOpen _ hvo hxv] using hb |
| 59 | · simpa only [iteratedFDerivWithin_of_isOpen _ ht'o hft'] using hA l hl |
| 60 | · simpa only [iteratedFDerivWithin_of_isOpen _ hvo hxv] using hB l hl hlm |
| 61 | |
| 62 | theorem norm_iteratedFDeriv_smul_le_of_contDiffAt |
| 63 | {f : E → ℝ} {g : E → F} {x : E} |
| 64 | (hf : ContDiffAt ℝ ∞ f x) (hg : ContDiffAt ℝ ∞ g x) (m : ℕ) : |
| 65 | ‖iteratedFDeriv ℝ m (fun y => f y • g y) x‖ ≤ |
| 66 | ∑ l ∈ Finset.range (m + 1), (m.choose l : ℝ) * |
| 67 | ‖iteratedFDeriv ℝ l f x‖ * ‖iteratedFDeriv ℝ (m - l) g x‖ := by |
| 68 | obtain ⟨s, hs, hfs⟩ := hf.contDiffOn (m := (m : ℕ∞ω)) (by exact_mod_cast le_top) (by simp) |
| 69 | obtain ⟨t, ht, hgt⟩ := hg.contDiffOn (m := (m : ℕ∞ω)) (by exact_mod_cast le_top) (by simp) |
| 70 | obtain ⟨v, hv, hvo, hxv⟩ := mem_nhds_iff.mp (inter_mem hs ht) |
| 71 | have h := norm_iteratedFDerivWithin_smul_le |
| 72 | (hfs.mono (fun _ hy => (hv hy).1)) (hgt.mono (fun _ hy => (hv hy).2)) |
| 73 | hvo.uniqueDiffOn hxv (le_refl (m : ℕ∞ω)) |
| 74 | simpa only [iteratedFDerivWithin_of_isOpen _ hvo hxv] using h |
| 75 | |
| 76 | variable {d : ℕ} {Ω : Set (EuclideanSpace ℝ (Fin d))} |
| 77 | |
| 78 | theorem locallyEventuallyBoundedDerivatives_const |
| 79 | (hΩ : IsOpen Ω) {f : EuclideanSpace ℝ (Fin d) → F} |
| 80 | (hf : ContDiffOn ℝ ∞ f Ω) : |
| 81 | LocallyEventuallyBoundedDerivatives Ω (fun _ : ℕ => f) := by |
| 82 | intro K hK hKΩ m |
| 83 | have hc : ContinuousOn (iteratedFDeriv ℝ m f) K := fun x hx => |
| 84 | ((hf.contDiffAt (hΩ.mem_nhds (hKΩ hx))).continuousAt_iteratedFDeriv |
| 85 | (by exact_mod_cast le_top)).continuousWithinAt |
| 86 | obtain ⟨B, hB⟩ := hK.exists_bound_of_continuousOn hc |
| 87 | exact ⟨B, Eventually.of_forall (fun _ => hB)⟩ |
| 88 | |
| 89 | theorem LocallyEventuallyBoundedDerivatives.bound_all |
| 90 | {f : ℕ → EuclideanSpace ℝ (Fin d) → F} |
| 91 | (hf : LocallyEventuallyBoundedDerivatives Ω f) |
| 92 | {K : Set (EuclideanSpace ℝ (Fin d))} (hK : IsCompact K) (hKΩ : K ⊆ Ω) (m : ℕ) : |
| 93 | ∃ B : ℝ, 0 ≤ B ∧ ∀ᶠ k in atTop, ∀ l, l ≤ m → ∀ x ∈ K, |
| 94 | ‖iteratedFDeriv ℝ l (f k) x‖ ≤ B := by |
| 95 | classical |
| 96 | choose C hC using fun l : Fin (m + 1) => hf K hK hKΩ l |
| 97 | let B := ∑ l, max (C l) 0 |
| 98 | refine ⟨B, Finset.sum_nonneg (fun l _ => le_max_right _ _), ?_⟩ |
| 99 | filter_upwards [eventually_all.mpr hC] with k hk l hl x hx |
| 100 | let j : Fin (m + 1) := ⟨l, Nat.lt_succ_of_le hl⟩ |
| 101 | exact (hk j x hx).trans ((le_max_left _ _).trans |
| 102 | (Finset.single_le_sum (fun q _ => le_max_right (C q) 0) (Finset.mem_univ j))) |
| 103 | |
| 104 | theorem LocallyEventuallyBoundedDerivatives.comp_fixed |
| 105 | {V : Set (EuclideanSpace ℝ (Fin d))} (hV : IsOpen V) |
| 106 | {f : ℕ → EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)} |
| 107 | {g : EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)} |
| 108 | (hf : LocallyEventuallyBoundedDerivatives Ω f) (hg : ContDiffOn ℝ ∞ g V) |
| 109 | (hgΩ : MapsTo g V Ω) |
| 110 | (hlocal : ∀ x ∈ Ω, ∃ W : Set (EuclideanSpace ℝ (Fin d)), IsOpen W ∧ x ∈ W ∧ |
| 111 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (f k) W) : |
| 112 | LocallyEventuallyBoundedDerivatives V (fun k => f k ∘ g) := by |
| 113 | intro K hK hKV m |
| 114 | have hKg := hK.image_of_continuousOn (hg.continuousOn.mono hKV) |
| 115 | have hKgΩ : g '' K ⊆ Ω := image_subset_iff.mpr (fun _ hx => hgΩ (hKV hx)) |
| 116 | obtain ⟨A, _, hA⟩ := hf.bound_all hKg hKgΩ m |
| 117 | obtain ⟨B, _, hB⟩ := (locallyEventuallyBoundedDerivatives_const hV hg).bound_all hK hKV m |
| 118 | refine ⟨m.factorial * A * (max B 1) ^ m, ?_⟩ |
| 119 | filter_upwards [hA, hB, |
| 120 | eventually_contDiffAt_on_compact_of_locally_eventually_smooth hKg hKgΩ hlocal] |
| 121 | with k hkA hkB hks x hx |
| 122 | apply norm_iteratedFDeriv_comp_le_of_contDiffAt |
| 123 | (hg.contDiffAt (hV.mem_nhds (hKV hx))) (hks _ (mem_image_of_mem g hx)) m |
| 124 | (fun l hl => hkA l hl _ (mem_image_of_mem g hx)) |
| 125 | intro l hl hlm |
| 126 | exact (hkB l hlm x hx).trans ((le_max_left _ _).trans |
| 127 | (le_self_pow₀ (le_max_right B 1) (Nat.ne_of_gt hl))) |
| 128 | |
| 129 | /-- Zeroth-order bounds confine the moving inner images to a compact ball, |
| 130 | where the outer derivative bounds can be applied uniformly. -/ |
| 131 | theorem LocallyEventuallyBoundedDerivatives.comp_univ |
| 132 | {f : ℕ → EuclideanSpace ℝ (Fin d) → F} |
| 133 | {g : ℕ → EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)} |
| 134 | (hf : LocallyEventuallyBoundedDerivatives univ f) |
| 135 | (hg : LocallyEventuallyBoundedDerivatives univ g) |
| 136 | (hsf : ∀ᶠ k in atTop, ContDiff ℝ ∞ (f k)) |
| 137 | (hsg : ∀ᶠ k in atTop, ContDiff ℝ ∞ (g k)) : |
| 138 | LocallyEventuallyBoundedDerivatives univ (fun k => f k ∘ g k) := by |
| 139 | intro K hK _ m |
| 140 | obtain ⟨B, hB0, hB⟩ := hg.bound_all hK (subset_univ K) m |
| 141 | let C := Metric.closedBall (0 : EuclideanSpace ℝ (Fin d)) B |
| 142 | obtain ⟨A, _, hA⟩ := hf.bound_all (isCompact_closedBall _ B) (subset_univ C) m |
| 143 | refine ⟨m.factorial * A * (max B 1) ^ m, ?_⟩ |
| 144 | filter_upwards [hA, hB, hsf, hsg] with k hkA hkB hksf hksg x hx |
| 145 | have hxC : g k x ∈ C := by |
| 146 | simpa only [C, Metric.mem_closedBall, dist_zero_right, norm_iteratedFDeriv_zero] |
| 147 | using hkB 0 (Nat.zero_le m) x hx |
| 148 | apply norm_iteratedFDeriv_comp_le_of_contDiffAt hksg.contDiffAt hksf.contDiffAt m |
| 149 | (fun l hl => hkA l hl _ hxC) |
| 150 | intro l hl hlm |
| 151 | exact (hkB l hlm x hx).trans ((le_max_left _ _).trans |
| 152 | (le_self_pow₀ (le_max_right B 1) (Nat.ne_of_gt hl))) |
| 153 | |
| 154 | theorem LocallyEventuallyBoundedDerivatives.cutoff_perturbation |
| 155 | {f : ℕ → EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)} |
| 156 | (hf : LocallyEventuallyBoundedDerivatives Ω f) |
| 157 | (hlocal : ∀ x ∈ Ω, ∃ W : Set (EuclideanSpace ℝ (Fin d)), IsOpen W ∧ x ∈ W ∧ |
| 158 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (f k) W) |
| 159 | {χ : EuclideanSpace ℝ (Fin d) → ℝ} (hχ : ContDiff ℝ ∞ χ) |
| 160 | (hχΩ : tsupport χ ⊆ Ω) : |
| 161 | LocallyEventuallyBoundedDerivatives univ (fun k x => x + χ x • (f k x - x)) := by |
| 162 | intro K hK _ m |
| 163 | let S := K ∩ tsupport χ |
| 164 | have hS : IsCompact S := hK.inter_right isClosed_closure |
| 165 | have hSΩ : S ⊆ Ω := fun _ hx => hχΩ hx.2 |
| 166 | obtain ⟨A, hA0, hA⟩ := hf.bound_all hS hSΩ m |
| 167 | obtain ⟨B, hB0, hB⟩ := |
| 168 | (locallyEventuallyBoundedDerivatives_const isOpen_univ |
| 169 | (contDiff_id.contDiffOn (𝕜 := ℝ) (E := EuclideanSpace ℝ (Fin d)) (n := ∞))).bound_all |
| 170 | hK (subset_univ K) m |
| 171 | obtain ⟨C, hC0, hC⟩ := |
| 172 | (locallyEventuallyBoundedDerivatives_const isOpen_univ hχ.contDiffOn).bound_all |
| 173 | hS (subset_univ S) m |
| 174 | let Q := ∑ l ∈ Finset.range (m + 1), (m.choose l : ℝ) * C * (A + B) |
| 175 | have hQ : 0 ≤ Q := Finset.sum_nonneg (fun l _ => by positivity) |
| 176 | refine ⟨B + Q, ?_⟩ |
| 177 | filter_upwards [hA, hB, hC, |
| 178 | eventually_contDiffAt_on_compact_of_locally_eventually_smooth hS hSΩ hlocal] |
| 179 | with k hkA hkB hkC hks x hx |
| 180 | by_cases hxs : x ∈ tsupport χ |
| 181 | · have hxS : x ∈ S := ⟨hx, hxs⟩ |
| 182 | have hdiff := hks x hxS |
| 183 | have hsub (l : ℕ) (hl : l ≤ m) : |
| 184 | ‖iteratedFDeriv ℝ l (fun y => f k y - y) x‖ ≤ A + B := by |
| 185 | change ‖iteratedFDeriv ℝ l (f k - id) x‖ ≤ A + B |
| 186 | rw [iteratedFDeriv_sub_apply (hdiff.of_le (by exact_mod_cast le_top)) |
| 187 | (contDiffAt_id : ContDiffAt ℝ (l : ℕ∞ω) id x)] |
| 188 | exact (norm_sub_le _ _).trans (add_le_add (hkA l hl x hxS) (hkB l hl x hx)) |
| 189 | have hsmul := norm_iteratedFDeriv_smul_le_of_contDiffAt hχ.contDiffAt |
| 190 | (hdiff.sub contDiffAt_id) m |
| 191 | have hsmulQ : ‖iteratedFDeriv ℝ m (fun y => χ y • (f k y - y)) x‖ ≤ Q := by |
| 192 | refine hsmul.trans (Finset.sum_le_sum fun l hl => ?_) |
| 193 | have hlm := Nat.le_of_lt_succ (Finset.mem_range.mp hl) |
| 194 | exact mul_le_mul (mul_le_mul_of_nonneg_left (hkC l hlm x hxS) (by positivity)) |
| 195 | (hsub (m - l) (Nat.sub_le _ _)) (norm_nonneg _) (by positivity) |
| 196 | change ‖iteratedFDeriv ℝ m (id + (fun y => χ y • (f k y - y))) x‖ ≤ B + Q |
| 197 | rw [iteratedFDeriv_add_apply (i := m) (f := id) (g := fun y => χ y • (f k y - y)) contDiffAt_id |
| 198 | ((hχ.contDiffAt.smul (hdiff.sub contDiffAt_id)).of_le (by exact_mod_cast le_top))] |
| 199 | exact (norm_add_le _ _).trans (add_le_add (hkB m le_rfl x hx) hsmulQ) |
| 200 | · have heq : (fun y => y + χ y • (f k y - y)) =ᶠ[𝓝 x] id := by |
| 201 | filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hxs] with y hy |
| 202 | simp only [Pi.zero_apply] at hy |
| 203 | simp [hy] |
| 204 | rw [(heq.iteratedFDeriv ℝ m).self_of_nhds] |
| 205 | exact (hkB m le_rfl x hx).trans (le_add_of_nonneg_right hQ) |
| 206 | |
| 207 | theorem locally_eventually_smooth_comp_fixed |
| 208 | {V : Set (EuclideanSpace ℝ (Fin d))} (hV : IsOpen V) |
| 209 | {f : ℕ → EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)} |
| 210 | {g : EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)} |
| 211 | (hg : ContDiffOn ℝ ∞ g V) (hgΩ : MapsTo g V Ω) |
| 212 | (hlocal : ∀ x ∈ Ω, ∃ W : Set (EuclideanSpace ℝ (Fin d)), IsOpen W ∧ x ∈ W ∧ |
| 213 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (f k) W) : |
| 214 | ∀ x ∈ V, ∃ W : Set (EuclideanSpace ℝ (Fin d)), IsOpen W ∧ x ∈ W ∧ |
| 215 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (f k ∘ g) W := by |
| 216 | intro x hx |
| 217 | obtain ⟨W, hW, hgxW, hfs⟩ := hlocal (g x) (hgΩ hx) |
| 218 | have hn := inter_mem (hV.mem_nhds hx) |
| 219 | ((hg.contDiffAt (hV.mem_nhds hx)).continuousAt.preimage_mem_nhds (hW.mem_nhds hgxW)) |
| 220 | obtain ⟨W', hW', hW'o, hxW'⟩ := mem_nhds_iff.mp hn |
| 221 | exact ⟨W', hW'o, hxW', hfs.mono fun _ hk => |
| 222 | hk.comp (hg.mono (fun _ hy => (hW' hy).1)) (fun _ hy => (hW' hy).2)⟩ |
| 223 | |
| 224 | theorem LocallyEventuallyBoundedDerivatives.comp |
| 225 | {V : Set (EuclideanSpace ℝ (Fin d))} (hΩ : IsOpen Ω) |
| 226 | {f g : ℕ → EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)} |
| 227 | {G : EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)} |
| 228 | (hf : LocallyEventuallyBoundedDerivatives Ω f) |
| 229 | (hg : LocallyEventuallyBoundedDerivatives V g) |
| 230 | (hG : ContinuousOn G V) (hGΩ : MapsTo G V Ω) |
| 231 | (hconv : ∀ K, IsCompact K → K ⊆ V → TendstoUniformlyOn g G atTop K) |
| 232 | (hflocal : ∀ x ∈ Ω, ∃ W : Set (EuclideanSpace ℝ (Fin d)), IsOpen W ∧ x ∈ W ∧ |
| 233 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (f k) W) |
| 234 | (hglocal : ∀ x ∈ V, ∃ W : Set (EuclideanSpace ℝ (Fin d)), IsOpen W ∧ x ∈ W ∧ |
| 235 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (g k) W) : |
| 236 | LocallyEventuallyBoundedDerivatives V (fun k => f k ∘ g k) := by |
| 237 | intro K hK hKV m |
| 238 | obtain ⟨T, hT, hTΩ, hmap⟩ := exists_compact_target_of_tendstoUniformlyOn hK hΩ |
| 239 | (hG.mono hKV) (hGΩ.mono_left hKV) (hconv K hK hKV) |
| 240 | obtain ⟨A, _, hA⟩ := hf.bound_all hT hTΩ m |
| 241 | obtain ⟨B, _, hB⟩ := hg.bound_all hK hKV m |
| 242 | refine ⟨m.factorial * A * (max B 1) ^ m, ?_⟩ |
| 243 | filter_upwards [hmap, hA, hB, |
| 244 | eventually_contDiffAt_on_compact_of_locally_eventually_smooth hT hTΩ hflocal, |
| 245 | eventually_contDiffAt_on_compact_of_locally_eventually_smooth hK hKV hglocal] |
| 246 | with k hkmap hkA hkB hkf hkg x hx |
| 247 | apply norm_iteratedFDeriv_comp_le_of_contDiffAt (hkg x hx) (hkf _ (hkmap hx)) m |
| 248 | (fun l hl => hkA l hl _ (hkmap hx)) |
| 249 | intro l hl hlm |
| 250 | exact (hkB l hlm x hx).trans ((le_max_left _ _).trans |
| 251 | (le_self_pow₀ (le_max_right B 1) (Nat.ne_of_gt hl))) |
| 252 | |
| 253 | theorem locally_eventually_smooth_comp |
| 254 | {V : Set (EuclideanSpace ℝ (Fin d))} (hΩ : IsOpen Ω) (hV : IsOpen V) |
| 255 | {f g : ℕ → EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)} |
| 256 | {G : EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)} |
| 257 | (hG : ContinuousOn G V) (hGΩ : MapsTo G V Ω) |
| 258 | (hconv : ∀ K, IsCompact K → K ⊆ V → TendstoUniformlyOn g G atTop K) |
| 259 | (hflocal : ∀ x ∈ Ω, ∃ W : Set (EuclideanSpace ℝ (Fin d)), IsOpen W ∧ x ∈ W ∧ |
| 260 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (f k) W) |
| 261 | (hglocal : ∀ x ∈ V, ∃ W : Set (EuclideanSpace ℝ (Fin d)), IsOpen W ∧ x ∈ W ∧ |
| 262 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (g k) W) : |
| 263 | ∀ x ∈ V, ∃ W : Set (EuclideanSpace ℝ (Fin d)), IsOpen W ∧ x ∈ W ∧ W ⊆ V ∧ |
| 264 | ∀ᶠ k in atTop, ContDiffOn ℝ ∞ (f k ∘ g k) W := by |
| 265 | intro x hx |
| 266 | obtain ⟨K, hK, hxK, hKV⟩ := exists_compact_between isCompact_singleton hV |
| 267 | (singleton_subset_iff.mpr hx) |
| 268 | obtain ⟨T, hT, hTΩ, hmap⟩ := exists_compact_target_of_tendstoUniformlyOn hK hΩ |
| 269 | (hG.mono hKV) (hGΩ.mono_left hKV) (hconv K hK hKV) |
| 270 | refine ⟨interior K, isOpen_interior, hxK (mem_singleton x), interior_subset.trans hKV, ?_⟩ |
| 271 | filter_upwards [hmap, |
| 272 | eventually_contDiffAt_on_compact_of_locally_eventually_smooth hT hTΩ hflocal, |
| 273 | eventually_contDiffAt_on_compact_of_locally_eventually_smooth hK hKV hglocal] |
| 274 | with k hkmap hkf hkg y hy |
| 275 | exact ((hkf _ (hkmap (interior_subset hy))).comp y |
| 276 | (hkg y (interior_subset hy))).contDiffWithinAt |
| 277 | |
| 278 | theorem locallyEventuallyBoundedDerivatives_of_tendsto_jets |
| 279 | (hΩ : IsOpen Ω) {f : ℕ → EuclideanSpace ℝ (Fin d) → F} |
| 280 | {F₀ : EuclideanSpace ℝ (Fin d) → F} (hF : ContDiffOn ℝ ∞ F₀ Ω) |
| 281 | (hjet : ∀ m K, IsCompact K → K ⊆ Ω → TendstoUniformlyOn |
| 282 | (fun k => iteratedFDeriv ℝ m (f k)) (iteratedFDeriv ℝ m F₀) atTop K) : |
| 283 | LocallyEventuallyBoundedDerivatives Ω f := by |
| 284 | intro K hK hKΩ m |
| 285 | have hc : ContinuousOn (iteratedFDeriv ℝ m F₀) K := fun x hx => |
| 286 | ((hF.contDiffAt (hΩ.mem_nhds (hKΩ hx))).continuousAt_iteratedFDeriv |
| 287 | (by exact_mod_cast le_top)).continuousWithinAt |
| 288 | obtain ⟨B, hB⟩ := hK.exists_bound_of_continuousOn hc |
| 289 | refine ⟨1 + B, ?_⟩ |
| 290 | filter_upwards [Metric.tendstoUniformlyOn_iff.mp (hjet m K hK hKΩ) 1 zero_lt_one] |
| 291 | with k hk x hx |
| 292 | have hn : ‖iteratedFDeriv ℝ m (f k) x - iteratedFDeriv ℝ m F₀ x‖ ≤ 1 := by |
| 293 | simpa only [dist_eq_norm, norm_sub_rev] using (hk x hx).le |
| 294 | calc |
| 295 | _ = ‖iteratedFDeriv ℝ m (f k) x - iteratedFDeriv ℝ m F₀ x + |
| 296 | iteratedFDeriv ℝ m F₀ x‖ := by rw [sub_add_cancel] |
| 297 | _ ≤ ‖iteratedFDeriv ℝ m (f k) x - iteratedFDeriv ℝ m F₀ x‖ + |
| 298 | ‖iteratedFDeriv ℝ m F₀ x‖ := norm_add_le _ _ |
| 299 | _ ≤ 1 + B := add_le_add hn (hB x hx) |
| 300 | |
| 301 | end Poincare.Analysis.Calculus |