Skip to content

Commit 58756c2

Browse files
CBirkbeckPaul-Lez
authored andcommitted
Iterated derivatives of tsum's within some open set. (leanprover-community#26016)
We add some IteratedDerivWithin versions of deriv_tsum using the new SummableLocallyUniformly API. This PR continues the work from leanprover-community#25096. Original PR: leanprover-community#25096
1 parent f6be079 commit 58756c2

File tree

5 files changed

+139
-0
lines changed

5 files changed

+139
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6161,6 +6161,7 @@ import Mathlib.Topology.Algebra.InfiniteSum.Nonarchimedean
61616161
import Mathlib.Topology.Algebra.InfiniteSum.Order
61626162
import Mathlib.Topology.Algebra.InfiniteSum.Real
61636163
import Mathlib.Topology.Algebra.InfiniteSum.Ring
6164+
import Mathlib.Topology.Algebra.InfiniteSum.TsumUniformlyOn
61646165
import Mathlib.Topology.Algebra.InfiniteSum.UniformOn
61656166
import Mathlib.Topology.Algebra.IntermediateField
61666167
import Mathlib.Topology.Algebra.IsOpenUnits

Mathlib/Algebra/BigOperators/Pi.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,19 @@ lemma Pi.mulSingle_induction [CommMonoid M] (p : (ι → M) → Prop) (f : ι
205205
cases nonempty_fintype ι
206206
rw [← Finset.univ_prod_mulSingle f]
207207
exact Finset.prod_induction _ _ mul one (by simp [mulSingle])
208+
209+
section EqOn
210+
211+
@[to_additive]
212+
theorem eqOn_finsetProd {ι α β : Type*} [CommMonoid α]
213+
{s : Set β} {f f' : ι → β → α} (h : ∀ (i : ι), Set.EqOn (f i) (f' i) s) (v : Finset ι) :
214+
Set.EqOn (∏ i ∈ v, f i) (∏ i ∈ v, f' i) s :=
215+
fun t ht => by simp [funext fun i ↦ h i ht]
216+
217+
@[to_additive]
218+
theorem eqOn_fun_finsetProd {ι α β : Type*} [CommMonoid α]
219+
{s : Set β} {f f' : ι → β → α} (h : ∀ (i : ι), Set.EqOn (f i) (f' i) s) (v : Finset ι) :
220+
Set.EqOn (fun b ↦ ∏ i ∈ v, f i b) (fun b ↦ ∏ i ∈ v, f' i b) s := by
221+
convert eqOn_finsetProd h v <;> simp
222+
223+
end EqOn

Mathlib/Analysis/Calculus/IteratedDeriv/Lemmas.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ theorem iteratedDerivWithin_add
4242
simp_rw [iteratedDerivWithin, iteratedFDerivWithin_add_apply hf hg h hx,
4343
ContinuousMultilinearMap.add_apply]
4444

45+
include h hx in
46+
theorem iteratedDerivWithin_fun_add
47+
(hf : ContDiffWithinAt 𝕜 n f s x) (hg : ContDiffWithinAt 𝕜 n g s x) :
48+
iteratedDerivWithin n (fun z ↦ f z + g z) s x =
49+
iteratedDerivWithin n f s x + iteratedDerivWithin n g s x := by
50+
simpa using iteratedDerivWithin_add hx h hf hg
51+
4552
theorem iteratedDerivWithin_const_add (hn : 0 < n) (c : F) :
4653
iteratedDerivWithin n (fun z => c + f z) s x = iteratedDerivWithin n f s x := by
4754
obtain ⟨n, rfl⟩ := n.exists_eq_succ_of_ne_zero hn.ne'
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
/-
2+
Copyright (c) 2025 Chris Birkbeck. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Chris Birkbeck
5+
-/
6+
import Mathlib.Analysis.Calculus.IteratedDeriv.Defs
7+
import Mathlib.Analysis.Calculus.UniformLimitsDeriv
8+
import Mathlib.Analysis.NormedSpace.FunctionSeries
9+
import Mathlib.Topology.Algebra.InfiniteSum.UniformOn
10+
11+
/-!
12+
# Differentiability of sum of functions
13+
14+
We prove some `HasSumUniformlyOn` versions of theorems from
15+
`Mathlib.Analysis.NormedSpace.FunctionSeries`.
16+
17+
Alongside this we prove `derivWithin_tsum` which states that the derivative of a series of functions
18+
is the sum of the derivatives, under suitable conditions we also prove an `iteratedDerivWithin`
19+
version.
20+
21+
-/
22+
23+
open Set Metric TopologicalSpace Function Filter
24+
25+
open scoped Topology NNReal
26+
27+
section UniformlyOn
28+
29+
variable {α β F : Type*} [NormedAddCommGroup F] [CompleteSpace F] {u : α → ℝ}
30+
31+
theorem HasSumUniformlyOn.of_norm_le_summable {f : α → β → F} (hu : Summable u) {s : Set β}
32+
(hfu : ∀ n x, x ∈ s → ‖f n x‖ ≤ u n) : HasSumUniformlyOn f (fun x ↦ ∑' n, f n x) {s} := by
33+
simp [hasSumUniformlyOn_iff_tendstoUniformlyOn, tendstoUniformlyOn_tsum hu hfu]
34+
35+
theorem HasSumUniformlyOn.of_norm_le_summable_eventually {ι : Type*} {f : ι → β → F} {u : ι → ℝ}
36+
(hu : Summable u) {s : Set β} (hfu : ∀ᶠ n in cofinite, ∀ x ∈ s, ‖f n x‖ ≤ u n) :
37+
HasSumUniformlyOn f (fun x ↦ ∑' n, f n x) {s} := by
38+
simp [hasSumUniformlyOn_iff_tendstoUniformlyOn,
39+
tendstoUniformlyOn_tsum_of_cofinite_eventually hu hfu]
40+
41+
lemma SummableLocallyUniformlyOn.of_locally_bounded_eventually [TopologicalSpace β]
42+
[LocallyCompactSpace β] {f : α → β → F} {s : Set β} (hs : IsOpen s)
43+
(hu : ∀ K ⊆ s, IsCompact K → ∃ u : α → ℝ, Summable u ∧
44+
∀ᶠ n in cofinite, ∀ k ∈ K, ‖f n k‖ ≤ u n) : SummableLocallyUniformlyOn f s := by
45+
apply HasSumLocallyUniformlyOn.summableLocallyUniformlyOn (g := fun x ↦ ∑' n, f n x)
46+
rw [hasSumLocallyUniformlyOn_iff_tendstoLocallyUniformlyOn,
47+
tendstoLocallyUniformlyOn_iff_forall_isCompact hs]
48+
intro K hK hKc
49+
obtain ⟨u, hu1, hu2⟩ := hu K hK hKc
50+
exact tendstoUniformlyOn_tsum_of_cofinite_eventually hu1 hu2
51+
52+
lemma SummableLocallyUniformlyOn_of_locally_bounded [TopologicalSpace β] [LocallyCompactSpace β]
53+
{f : α → β → F} {s : Set β} (hs : IsOpen s)
54+
(hu : ∀ K ⊆ s, IsCompact K → ∃ u : α → ℝ, Summable u ∧ ∀ n, ∀ k ∈ K, ‖f n k‖ ≤ u n) :
55+
SummableLocallyUniformlyOn f s := by
56+
apply SummableLocallyUniformlyOn.of_locally_bounded_eventually hs
57+
intro K hK hKc
58+
obtain ⟨u, hu1, hu2⟩ := hu K hK hKc
59+
exact ⟨u, hu1, by filter_upwards using hu2⟩
60+
61+
end UniformlyOn
62+
63+
variable {ι F E : Type*} [NontriviallyNormedField E] [IsRCLikeNormedField E]
64+
[NormedAddCommGroup F] [NormedSpace E F] {s : Set E}
65+
66+
/-- The `derivWithin` of a sum whose derivative is absolutely and uniformly convergent sum on an
67+
open set `s` is the sum of the derivatives of sequence of functions on the open set `s` -/
68+
theorem derivWithin_tsum {f : ι → E → F} (hs : IsOpen s) {x : E} (hx : x ∈ s)
69+
(hf : ∀ y ∈ s, Summable fun n ↦ f n y)
70+
(h : SummableLocallyUniformlyOn (fun n ↦ (derivWithin (fun z ↦ f n z) s)) s)
71+
(hf2 : ∀ n r, r ∈ s → DifferentiableAt E (f n) r) :
72+
derivWithin (fun z ↦ ∑' n , f n z) s x = ∑' n, derivWithin (f n) s x := by
73+
apply HasDerivWithinAt.derivWithin ?_ (hs.uniqueDiffWithinAt hx)
74+
apply HasDerivAt.hasDerivWithinAt
75+
apply hasDerivAt_of_tendstoLocallyUniformlyOn hs _ _ (fun y hy ↦(hf y hy).hasSum ) hx
76+
(f' := fun n : Finset ι ↦ fun a ↦ ∑ i ∈ n, derivWithin (fun z ↦ f i z) s a)
77+
· obtain ⟨g, hg⟩ := h
78+
apply (hasSumLocallyUniformlyOn_iff_tendstoLocallyUniformlyOn.mp hg).congr_right
79+
exact fun _ hb ↦ Eq.symm (hg.tsum_eqOn hb)
80+
· filter_upwards with t r hr using HasDerivAt.fun_sum
81+
(fun q hq ↦ ((hf2 q r hr).differentiableWithinAt.hasDerivWithinAt.hasDerivAt)
82+
(hs.mem_nhds hr))
83+
84+
/-- If a sequence of functions `fₙ` is such that `∑ fₙ (z)` is summable for each `z` in an
85+
open set `s`, and for each `1 ≤ k ≤ m`, the series of `k`-th iterated derivatives
86+
`∑ (iteratedDerivWithin k fₙ s) (z)`
87+
is summable locally uniformly on `s`, and each `fₙ` is `m`-times differentiable, then the `m`-th
88+
iterated derivative of the sum is the sum of the `m`-th iterated derivatives. -/
89+
theorem iteratedDerivWithin_tsum {f : ι → E → F} (m : ℕ) (hs : IsOpen s)
90+
{x : E} (hx : x ∈ s) (hsum : ∀ t ∈ s, Summable (fun n : ι ↦ f n t))
91+
(h : ∀ k, 1 ≤ k → k ≤ m → SummableLocallyUniformlyOn
92+
(fun n ↦ (iteratedDerivWithin k (fun z ↦ f n z) s)) s)
93+
(hf2 : ∀ n k r, k ≤ m → r ∈ s →
94+
DifferentiableAt E (iteratedDerivWithin k (fun z ↦ f n z) s) r) :
95+
iteratedDerivWithin m (fun z ↦ ∑' n , f n z) s x = ∑' n, iteratedDerivWithin m (f n) s x := by
96+
induction' m with m hm generalizing x
97+
· simp
98+
· simp_rw [iteratedDerivWithin_succ]
99+
rw [← derivWithin_tsum hs hx _ _ (fun n r hr ↦ hf2 n m r (by omega) hr)]
100+
· exact derivWithin_congr (fun t ht ↦ hm ht (fun k hk1 hkm ↦ h k hk1 (by omega))
101+
(fun k r e hr he ↦ hf2 k r e (by omega) he)) (hm hx (fun k hk1 hkm ↦ h k hk1 (by omega))
102+
(fun k r e hr he ↦ hf2 k r e (by omega) he))
103+
· intro r hr
104+
by_cases hm2 : m = 0
105+
· simp [hm2, hsum r hr]
106+
· exact ((h m (by omega) (by omega)).summable hr).congr (fun _ ↦ by simp)
107+
· exact SummableLocallyUniformlyOn_congr
108+
(fun _ _ ht ↦ iteratedDerivWithin_succ) (h (m + 1) (by omega) (by omega))

Mathlib/Topology/Algebra/InfiniteSum/UniformOn.lean

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ theorem HasProdLocallyUniformlyOn.tprod_eqOn [T2Space α]
224224
(h : HasProdLocallyUniformlyOn f g s) : Set.EqOn (∏' i, f i ·) g s :=
225225
fun _ hx ↦ (h.hasProd hx).tprod_eq
226226

227+
@[to_additive]
228+
lemma MultipliableLocallyUniformlyOn_congr [T2Space α]
229+
{f f' : ι → β → α} (h : ∀ i, s.EqOn (f i) (f' i))
230+
(h2 : MultipliableLocallyUniformlyOn f s) : MultipliableLocallyUniformlyOn f' s := by
231+
apply HasProdLocallyUniformlyOn.multipliableLocallyUniformlyOn
232+
exact (h2.hasProdLocallyUniformlyOn).congr fun v ↦ eqOn_fun_finsetProd h v
233+
227234
@[to_additive]
228235
lemma HasProdLocallyUniformlyOn.tendstoLocallyUniformlyOn_finsetRange
229236
{f : ℕ → β → α} (h : HasProdLocallyUniformlyOn f g s) :

0 commit comments

Comments
 (0)