# Smoothness of series #

We show that series of functions are differentiable, or smooth, when each individual function in the series is and additionally suitable uniform summable bounds are satisfied.

More specifically,

• differentiable_tsum ensures that a series of differentiable functions is differentiable.
• contDiff_tsum ensures that a series of smooth functions is smooth.

We also give versions of these statements which are localized to a set.

### Differentiability #

theorem summable_of_summable_hasFDerivAt_of_isPreconnected {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {f' : ฮฑ โ E โ E โL[๐] F} {s : Set E} {xโ : E} {x : E} (hu : ) (hs : ) (h's : ) (hf : โ (n : ฮฑ), โ x โ s, HasFDerivAt (f n) (f' n x) x) (hf' : โ (n : ฮฑ), โ x โ s, โf' n xโ โค u n) (hxโ : xโ โ s) (hf0 : Summable fun (x : ฮฑ) => f x xโ) (hx : x โ s) :
Summable fun (n : ฮฑ) => f n x

Consider a series of functions โ' n, f n x on a preconnected open set. If the series converges at a point, and all functions in the series are differentiable with a summable bound on the derivatives, then the series converges everywhere on the set.

theorem summable_of_summable_hasDerivAt_of_isPreconnected {ฮฑ : Type u_1} {๐ : Type u_3} {F : Type u_5} [RCLike ๐] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {g : ฮฑ โ ๐ โ F} {g' : ฮฑ โ ๐ โ F} {t : Set ๐} {yโ : ๐} {y : ๐} (hu : ) (ht : ) (h't : ) (hg : โ (n : ฮฑ), โ y โ t, HasDerivAt (g n) (g' n y) y) (hg' : โ (n : ฮฑ), โ y โ t, โg' n yโ โค u n) (hyโ : yโ โ t) (hg0 : Summable fun (x : ฮฑ) => g x yโ) (hy : y โ t) :
Summable fun (n : ฮฑ) => g n y

Consider a series of functions โ' n, f n x on a preconnected open set. If the series converges at a point, and all functions in the series are differentiable with a summable bound on the derivatives, then the series converges everywhere on the set.

theorem hasFDerivAt_tsum_of_isPreconnected {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {f' : ฮฑ โ E โ E โL[๐] F} {s : Set E} {xโ : E} {x : E} (hu : ) (hs : ) (h's : ) (hf : โ (n : ฮฑ), โ x โ s, HasFDerivAt (f n) (f' n x) x) (hf' : โ (n : ฮฑ), โ x โ s, โf' n xโ โค u n) (hxโ : xโ โ s) (hf0 : Summable fun (n : ฮฑ) => f n xโ) (hx : x โ s) :
HasFDerivAt (fun (y : E) => โ' (n : ฮฑ), f n y) (โ' (n : ฮฑ), f' n x) x

Consider a series of functions โ' n, f n x on a preconnected open set. If the series converges at a point, and all functions in the series are differentiable with a summable bound on the derivatives, then the series is differentiable on the set and its derivative is the sum of the derivatives.

theorem hasDerivAt_tsum_of_isPreconnected {ฮฑ : Type u_1} {๐ : Type u_3} {F : Type u_5} [RCLike ๐] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {g : ฮฑ โ ๐ โ F} {g' : ฮฑ โ ๐ โ F} {t : Set ๐} {yโ : ๐} {y : ๐} (hu : ) (ht : ) (h't : ) (hg : โ (n : ฮฑ), โ y โ t, HasDerivAt (g n) (g' n y) y) (hg' : โ (n : ฮฑ), โ y โ t, โg' n yโ โค u n) (hyโ : yโ โ t) (hg0 : Summable fun (n : ฮฑ) => g n yโ) (hy : y โ t) :
HasDerivAt (fun (z : ๐) => โ' (n : ฮฑ), g n z) (โ' (n : ฮฑ), g' n y) y

Consider a series of functions โ' n, f n x on a preconnected open set. If the series converges at a point, and all functions in the series are differentiable with a summable bound on the derivatives, then the series is differentiable on the set and its derivative is the sum of the derivatives.

theorem summable_of_summable_hasFDerivAt {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {f' : ฮฑ โ E โ E โL[๐] F} {xโ : E} (hu : ) (hf : โ (n : ฮฑ) (x : E), HasFDerivAt (f n) (f' n x) x) (hf' : โ (n : ฮฑ) (x : E), โf' n xโ โค u n) (hf0 : Summable fun (n : ฮฑ) => f n xโ) (x : E) :
Summable fun (n : ฮฑ) => f n x

Consider a series of functions โ' n, f n x. If the series converges at a point, and all functions in the series are differentiable with a summable bound on the derivatives, then the series converges everywhere.

theorem summable_of_summable_hasDerivAt {ฮฑ : Type u_1} {๐ : Type u_3} {F : Type u_5} [RCLike ๐] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {g : ฮฑ โ ๐ โ F} {g' : ฮฑ โ ๐ โ F} {yโ : ๐} (hu : ) (hg : โ (n : ฮฑ) (y : ๐), HasDerivAt (g n) (g' n y) y) (hg' : โ (n : ฮฑ) (y : ๐), โg' n yโ โค u n) (hg0 : Summable fun (n : ฮฑ) => g n yโ) (y : ๐) :
Summable fun (n : ฮฑ) => g n y

Consider a series of functions โ' n, f n x. If the series converges at a point, and all functions in the series are differentiable with a summable bound on the derivatives, then the series converges everywhere.

theorem hasFDerivAt_tsum {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {f' : ฮฑ โ E โ E โL[๐] F} {xโ : E} (hu : ) (hf : โ (n : ฮฑ) (x : E), HasFDerivAt (f n) (f' n x) x) (hf' : โ (n : ฮฑ) (x : E), โf' n xโ โค u n) (hf0 : Summable fun (n : ฮฑ) => f n xโ) (x : E) :
HasFDerivAt (fun (y : E) => โ' (n : ฮฑ), f n y) (โ' (n : ฮฑ), f' n x) x

Consider a series of functions โ' n, f n x. If the series converges at a point, and all functions in the series are differentiable with a summable bound on the derivatives, then the series is differentiable and its derivative is the sum of the derivatives.

theorem hasDerivAt_tsum {ฮฑ : Type u_1} {๐ : Type u_3} {F : Type u_5} [RCLike ๐] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {g : ฮฑ โ ๐ โ F} {g' : ฮฑ โ ๐ โ F} {yโ : ๐} (hu : ) (hg : โ (n : ฮฑ) (y : ๐), HasDerivAt (g n) (g' n y) y) (hg' : โ (n : ฮฑ) (y : ๐), โg' n yโ โค u n) (hg0 : Summable fun (n : ฮฑ) => g n yโ) (y : ๐) :
HasDerivAt (fun (z : ๐) => โ' (n : ฮฑ), g n z) (โ' (n : ฮฑ), g' n y) y

Consider a series of functions โ' n, f n x. If the series converges at a point, and all functions in the series are differentiable with a summable bound on the derivatives, then the series is differentiable and its derivative is the sum of the derivatives.

theorem differentiable_tsum {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {f' : ฮฑ โ E โ E โL[๐] F} (hu : ) (hf : โ (n : ฮฑ) (x : E), HasFDerivAt (f n) (f' n x) x) (hf' : โ (n : ฮฑ) (x : E), โf' n xโ โค u n) :
Differentiable ๐ fun (y : E) => โ' (n : ฮฑ), f n y

Consider a series of functions โ' n, f n x. If all functions in the series are differentiable with a summable bound on the derivatives, then the series is differentiable. Note that our assumptions do not ensure the pointwise convergence, but if there is no pointwise convergence then the series is zero everywhere so the result still holds.

theorem differentiable_tsum' {ฮฑ : Type u_1} {๐ : Type u_3} {F : Type u_5} [RCLike ๐] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {g : ฮฑ โ ๐ โ F} {g' : ฮฑ โ ๐ โ F} (hu : ) (hg : โ (n : ฮฑ) (y : ๐), HasDerivAt (g n) (g' n y) y) (hg' : โ (n : ฮฑ) (y : ๐), โg' n yโ โค u n) :
Differentiable ๐ fun (z : ๐) => โ' (n : ฮฑ), g n z

Consider a series of functions โ' n, f n x. If all functions in the series are differentiable with a summable bound on the derivatives, then the series is differentiable. Note that our assumptions do not ensure the pointwise convergence, but if there is no pointwise convergence then the series is zero everywhere so the result still holds.

theorem fderiv_tsum_apply {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {xโ : E} (hu : ) (hf : โ (n : ฮฑ), Differentiable ๐ (f n)) (hf' : โ (n : ฮฑ) (x : E), โfderiv ๐ (f n) xโ โค u n) (hf0 : Summable fun (n : ฮฑ) => f n xโ) (x : E) :
fderiv ๐ (fun (y : E) => โ' (n : ฮฑ), f n y) x = โ' (n : ฮฑ), fderiv ๐ (f n) x
theorem deriv_tsum_apply {ฮฑ : Type u_1} {๐ : Type u_3} {F : Type u_5} [RCLike ๐] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {g : ฮฑ โ ๐ โ F} {yโ : ๐} (hu : ) (hg : โ (n : ฮฑ), Differentiable ๐ (g n)) (hg' : โ (n : ฮฑ) (y : ๐), โderiv (g n) yโ โค u n) (hg0 : Summable fun (n : ฮฑ) => g n yโ) (y : ๐) :
deriv (fun (z : ๐) => โ' (n : ฮฑ), g n z) y = โ' (n : ฮฑ), deriv (g n) y
theorem fderiv_tsum {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {xโ : E} (hu : ) (hf : โ (n : ฮฑ), Differentiable ๐ (f n)) (hf' : โ (n : ฮฑ) (x : E), โfderiv ๐ (f n) xโ โค u n) (hf0 : Summable fun (n : ฮฑ) => f n xโ) :
(fderiv ๐ fun (y : E) => โ' (n : ฮฑ), f n y) = fun (x : E) => โ' (n : ฮฑ), fderiv ๐ (f n) x
theorem deriv_tsum {ฮฑ : Type u_1} {๐ : Type u_3} {F : Type u_5} [RCLike ๐] [] {u : ฮฑ โ โ} [NormedSpace ๐ F] {g : ฮฑ โ ๐ โ F} {yโ : ๐} (hu : ) (hg : โ (n : ฮฑ), Differentiable ๐ (g n)) (hg' : โ (n : ฮฑ) (y : ๐), โderiv (g n) yโ โค u n) (hg0 : Summable fun (n : ฮฑ) => g n yโ) :
(deriv fun (y : ๐) => โ' (n : ฮฑ), g n y) = fun (y : ๐) => โ' (n : ฮฑ), deriv (g n) y

### Higher smoothness #

theorem iteratedFDeriv_tsum {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {v : โ โ ฮฑ โ โ} {N : โโ} (hf : โ (i : ฮฑ), ContDiff ๐ N (f i)) (hv : โ (k : โ), โk โค N โ Summable (v k)) (h'f : โ (k : โ) (i : ฮฑ) (x : E), โk โค N โ โiteratedFDeriv ๐ k (f i) xโ โค v k i) {k : โ} (hk : โk โค N) :
(iteratedFDeriv ๐ k fun (y : E) => โ' (n : ฮฑ), f n y) = fun (x : E) => โ' (n : ฮฑ), iteratedFDeriv ๐ k (f n) x

Consider a series of smooth functions, with summable uniform bounds on the successive derivatives. Then the iterated derivative of the sum is the sum of the iterated derivative.

theorem iteratedFDeriv_tsum_apply {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {v : โ โ ฮฑ โ โ} {N : โโ} (hf : โ (i : ฮฑ), ContDiff ๐ N (f i)) (hv : โ (k : โ), โk โค N โ Summable (v k)) (h'f : โ (k : โ) (i : ฮฑ) (x : E), โk โค N โ โiteratedFDeriv ๐ k (f i) xโ โค v k i) {k : โ} (hk : โk โค N) (x : E) :
iteratedFDeriv ๐ k (fun (y : E) => โ' (n : ฮฑ), f n y) x = โ' (n : ฮฑ), iteratedFDeriv ๐ k (f n) x

Consider a series of smooth functions, with summable uniform bounds on the successive derivatives. Then the iterated derivative of the sum is the sum of the iterated derivative.

theorem contDiff_tsum {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {v : โ โ ฮฑ โ โ} {N : โโ} (hf : โ (i : ฮฑ), ContDiff ๐ N (f i)) (hv : โ (k : โ), โk โค N โ Summable (v k)) (h'f : โ (k : โ) (i : ฮฑ) (x : E), โk โค N โ โiteratedFDeriv ๐ k (f i) xโ โค v k i) :
ContDiff ๐ N fun (x : E) => โ' (i : ฮฑ), f i x

Consider a series of functions โ' i, f i x. Assume that each individual function f i is of class C^N, and moreover there is a uniform summable upper bound on the k-th derivative for each k โค N. Then the series is also C^N.

theorem contDiff_tsum_of_eventually {ฮฑ : Type u_1} {๐ : Type u_3} {E : Type u_4} {F : Type u_5} [RCLike ๐] [NormedSpace ๐ E] [] [NormedSpace ๐ F] {f : ฮฑ โ E โ F} {v : โ โ ฮฑ โ โ} {N : โโ} (hf : โ (i : ฮฑ), ContDiff ๐ N (f i)) (hv : โ (k : โ), โk โค N โ Summable (v k)) (h'f : โ (k : โ), โk โค N โ โแถ  (i : ฮฑ) in Filter.cofinite, โ (x : E), โiteratedFDeriv ๐ k (f i) xโ โค v k i) :
ContDiff ๐ N fun (x : E) => โ' (i : ฮฑ), f i x

Consider a series of functions โ' i, f i x. Assume that each individual function f i is of class C^N, and moreover there is a uniform summable upper bound on the k-th derivative for each k โค N (except maybe for finitely many is). Then the series is also C^N.