-
Notifications
You must be signed in to change notification settings - Fork 257
/
CPolynomial.lean
539 lines (442 loc) Β· 27 KB
/
CPolynomial.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
/-
Copyright (c) 2023 Sophie Morel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sophie Morel
-/
import Mathlib.Analysis.Analytic.Basic
/-! We specialize the theory fo analytic functions to the case of functions that admit a
development given by a *finite* formal multilinear series. We call them "continuously polynomial",
which is abbreviated to `CPolynomial`. One reason to do that is that we no longer need a
completeness assumption on the target space `F` to make the series converge, so some of the results
are more general. The class of continuously polynomial functions includes functions defined by
polynomials on a normed `π`-algebra and continuous multilinear maps.
## Main definitions
Let `p` be a formal multilinear series from `E` to `F`, i.e., `p n` is a multilinear map on `E^n`
for `n : β`, and let `f` be a function from `E` to `F`.
* `HasFiniteFPowerSeriesOnBall f p x n r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yα΅`, and moreover `pβ = 0` if `n β€ m`.
* `HasFiniteFPowerSeriesAt f p x n`: on some ball of center `x` with positive radius, holds
`HasFiniteFPowerSeriesOnBall f p x n r`.
* `CPolynomialAt π f x`: there exists a power series `p` and a natural number `n` such that
holds `HasFPowerSeriesAt f p x n`.
* `CPolynomialOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function is continuously polynomial, then it is analytic, see
`HasFiniteFPowerSeriesOnBall.hasFPowerSeriesOnBall`, `HasFiniteFPowerSeriesAt.hasFPowerSeriesAt`,
`CPolynomialAt.analyticAt` and `CPolynomialOn.analyticOn`.
* The sum of a finite formal power series with positive radius is well defined on the whole space,
see `FormalMultilinearSeries.hasFiniteFPowerSeriesOnBall_of_finite`.
* If a function admits a finite power series in a ball, then it is continuously polynomial at
any point `y` of this ball, and the power series there can be expressed in terms of the initial
power series `p` as `p.changeOrigin y`, which is finite (with the same bound as `p`) by
`changeOrigin_finite_of_finite`. See `HasFiniteFPowerSeriesOnBall.changeOrigin `. It follows in
particular that the set of points at which a given function is continuously polynomial is open,
see `isOpen_cPolynomialAt`.
-/
variable {π E F G : Type*} [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E]
[NormedAddCommGroup F] [NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
open scoped Classical
open Topology BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β} {n m : β}
section FiniteFPowerSeries
/-- Given a function `f : E β F`, a formal multilinear series `p` and `n : β`, we say that
`f` has `p` as a finite power series on the ball of radius `r > 0` around `x` if
`f (x + y) = β' pβ yα΅` for all `βyβ < r` and `pβ = 0` for `n β€ m`.-/
structure HasFiniteFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E)
(n : β) (r : ββ₯0β) extends HasFPowerSeriesOnBall f p x r : Prop where
finite : β (m : β), n β€ m β p m = 0
theorem HasFiniteFPowerSeriesOnBall.mk' {f : E β F} {p : FormalMultilinearSeries π E F} {x : E}
{n : β} {r : ββ₯0β} (finite : β (m : β), n β€ m β p m = 0) (pos : 0 < r)
(sum_eq : β y β EMetric.ball 0 r, (β i in Finset.range n, p i fun _ β¦ y) = f (x + y)) :
HasFiniteFPowerSeriesOnBall f p x n r where
r_le := p.radius_eq_top_of_eventually_eq_zero (Filter.eventually_atTop.mpr β¨n, finiteβ©) βΈ le_top
r_pos := pos
hasSum hy := sum_eq _ hy βΈ hasSum_sum_of_ne_finset_zero fun m hm β¦ by
rw [Finset.mem_range, not_lt] at hm; rw [finite m hm]; rfl
finite := finite
/-- Given a function `f : E β F`, a formal multilinear series `p` and `n : β`, we say that
`f` has `p` as a finite power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a
neighborhood of `0`and `pβ = 0` for `n β€ m`.-/
def HasFiniteFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (n : β) :=
β r, HasFiniteFPowerSeriesOnBall f p x n r
theorem HasFiniteFPowerSeriesAt.toHasFPowerSeriesAt
(hf : HasFiniteFPowerSeriesAt f p x n) : HasFPowerSeriesAt f p x :=
let β¨r, hfβ© := hf
β¨r, hf.toHasFPowerSeriesOnBallβ©
theorem HasFiniteFPowerSeriesAt.finite (hf : HasFiniteFPowerSeriesAt f p x n) :
β m : β, n β€ m β p m = 0 := let β¨_, hfβ© := hf; hf.finite
variable (π)
/-- Given a function `f : E β F`, we say that `f` is continuously polynomial (cpolynomial)
at `x` if it admits a finite power series expansion around `x`. -/
def CPolynomialAt (f : E β F) (x : E) :=
β (p : FormalMultilinearSeries π E F) (n : β), HasFiniteFPowerSeriesAt f p x n
/-- Given a function `f : E β F`, we say that `f` is continuously polynomial on a set `s`
if it is continuously polynomial around every point of `s`. -/
def CPolynomialOn (f : E β F) (s : Set E) :=
β x, x β s β CPolynomialAt π f x
variable {π}
theorem HasFiniteFPowerSeriesOnBall.hasFiniteFPowerSeriesAt
(hf : HasFiniteFPowerSeriesOnBall f p x n r) :
HasFiniteFPowerSeriesAt f p x n :=
β¨r, hfβ©
theorem HasFiniteFPowerSeriesAt.cPolynomialAt (hf : HasFiniteFPowerSeriesAt f p x n) :
CPolynomialAt π f x :=
β¨p, n, hfβ©
theorem HasFiniteFPowerSeriesOnBall.cPolynomialAt (hf : HasFiniteFPowerSeriesOnBall f p x n r) :
CPolynomialAt π f x :=
hf.hasFiniteFPowerSeriesAt.cPolynomialAt
theorem CPolynomialAt.analyticAt (hf : CPolynomialAt π f x) : AnalyticAt π f x :=
let β¨p, _, hpβ© := hf
β¨p, hp.toHasFPowerSeriesAtβ©
theorem CPolynomialOn.analyticOn {s : Set E} (hf : CPolynomialOn π f s) : AnalyticOn π f s :=
fun x hx β¦ (hf x hx).analyticAt
theorem HasFiniteFPowerSeriesOnBall.congr (hf : HasFiniteFPowerSeriesOnBall f p x n r)
(hg : EqOn f g (EMetric.ball x r)) : HasFiniteFPowerSeriesOnBall g p x n r :=
β¨hf.1.congr hg, hf.finiteβ©
/-- If a function `f` has a finite power series `p` around `x`, then the function
`z β¦ f (z - y)` has the same finite power series around `x + y`. -/
theorem HasFiniteFPowerSeriesOnBall.comp_sub (hf : HasFiniteFPowerSeriesOnBall f p x n r) (y : E) :
HasFiniteFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) n r :=
β¨hf.1.comp_sub y, hf.finiteβ©
theorem HasFiniteFPowerSeriesOnBall.mono (hf : HasFiniteFPowerSeriesOnBall f p x n r)
(r'_pos : 0 < r') (hr : r' β€ r) : HasFiniteFPowerSeriesOnBall f p x n r' :=
β¨hf.1.mono r'_pos hr, hf.finiteβ©
theorem HasFiniteFPowerSeriesAt.congr (hf : HasFiniteFPowerSeriesAt f p x n) (hg : f =αΆ [π x] g) :
HasFiniteFPowerSeriesAt g p x n :=
Exists.imp (fun _ hg β¦ β¨hg, hf.finiteβ©) (hf.toHasFPowerSeriesAt.congr hg)
protected theorem HasFiniteFPowerSeriesAt.eventually (hf : HasFiniteFPowerSeriesAt f p x n) :
βαΆ r : ββ₯0β in π[>] 0, HasFiniteFPowerSeriesOnBall f p x n r :=
hf.toHasFPowerSeriesAt.eventually.mono fun _ h β¦ β¨h, hf.finiteβ©
theorem hasFiniteFPowerSeriesOnBall_const {c : F} {e : E} :
HasFiniteFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e 1 β€ :=
β¨hasFPowerSeriesOnBall_const, fun n hn β¦ constFormalMultilinearSeries_apply (id hn : 0 < n).ne'β©
theorem hasFiniteFPowerSeriesAt_const {c : F} {e : E} :
HasFiniteFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e 1 :=
β¨β€, hasFiniteFPowerSeriesOnBall_constβ©
theorem CPolynomialAt_const {v : F} : CPolynomialAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, 1, hasFiniteFPowerSeriesAt_constβ©
theorem CPolynomialOn_const {v : F} {s : Set E} : CPolynomialOn π (fun _ => v) s :=
fun _ _ => CPolynomialAt_const
theorem HasFiniteFPowerSeriesOnBall.add (hf : HasFiniteFPowerSeriesOnBall f pf x n r)
(hg : HasFiniteFPowerSeriesOnBall g pg x m r) :
HasFiniteFPowerSeriesOnBall (f + g) (pf + pg) x (max n m) r :=
β¨hf.1.add hg.1, fun N hN β¦ by
rw [Pi.add_apply, hf.finite _ ((le_max_left n m).trans hN),
hg.finite _ ((le_max_right n m).trans hN), zero_add]β©
theorem HasFiniteFPowerSeriesAt.add (hf : HasFiniteFPowerSeriesAt f pf x n)
(hg : HasFiniteFPowerSeriesAt g pg x m) :
HasFiniteFPowerSeriesAt (f + g) (pf + pg) x (max n m) := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
theorem CPolynomialAt.congr (hf : CPolynomialAt π f x) (hg : f =αΆ [π x] g) : CPolynomialAt π g x :=
let β¨_, _, hpfβ© := hf
(hpf.congr hg).cPolynomialAt
theorem CPolynomialAt_congr (h : f =αΆ [π x] g) : CPolynomialAt π f x β CPolynomialAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem CPolynomialAt.add (hf : CPolynomialAt π f x) (hg : CPolynomialAt π g x) :
CPolynomialAt π (f + g) x :=
let β¨_, _, hpfβ© := hf
let β¨_, _, hqfβ© := hg
(hpf.add hqf).cPolynomialAt
theorem HasFiniteFPowerSeriesOnBall.neg (hf : HasFiniteFPowerSeriesOnBall f pf x n r) :
HasFiniteFPowerSeriesOnBall (-f) (-pf) x n r :=
β¨hf.1.neg, fun m hm β¦ by rw [Pi.neg_apply, hf.finite m hm, neg_zero]β©
theorem HasFiniteFPowerSeriesAt.neg (hf : HasFiniteFPowerSeriesAt f pf x n) :
HasFiniteFPowerSeriesAt (-f) (-pf) x n :=
let β¨_, hrfβ© := hf
hrf.neg.hasFiniteFPowerSeriesAt
theorem CPolynomialAt.neg (hf : CPolynomialAt π f x) : CPolynomialAt π (-f) x :=
let β¨_, _, hpfβ© := hf
hpf.neg.cPolynomialAt
theorem HasFiniteFPowerSeriesOnBall.sub (hf : HasFiniteFPowerSeriesOnBall f pf x n r)
(hg : HasFiniteFPowerSeriesOnBall g pg x m r) :
HasFiniteFPowerSeriesOnBall (f - g) (pf - pg) x (max n m) r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
theorem HasFiniteFPowerSeriesAt.sub (hf : HasFiniteFPowerSeriesAt f pf x n)
(hg : HasFiniteFPowerSeriesAt g pg x m) :
HasFiniteFPowerSeriesAt (f - g) (pf - pg) x (max n m) := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
theorem CPolynomialAt.sub (hf : CPolynomialAt π f x) (hg : CPolynomialAt π g x) :
CPolynomialAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
theorem CPolynomialOn.mono {s t : Set E} (hf : CPolynomialOn π f t) (hst : s β t) :
CPolynomialOn π f s :=
fun z hz => hf z (hst hz)
theorem CPolynomialOn.congr' {s : Set E} (hf : CPolynomialOn π f s) (hg : f =αΆ [πΛ’ s] g) :
CPolynomialOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem CPolynomialOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) :
CPolynomialOn π f s β CPolynomialOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem CPolynomialOn.congr {s : Set E} (hs : IsOpen s) (hf : CPolynomialOn π f s)
(hg : s.EqOn f g) : CPolynomialOn π g s :=
hf.congr' <| mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem CPolynomialOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) :
CPolynomialOn π f s β CPolynomialOn π g s :=
β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem CPolynomialOn.add {s : Set E} (hf : CPolynomialOn π f s) (hg : CPolynomialOn π g s) :
CPolynomialOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
theorem CPolynomialOn.sub {s : Set E} (hf : CPolynomialOn π f s) (hg : CPolynomialOn π g s) :
CPolynomialOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
/-- If a function `f` has a finite power series `p` on a ball and `g` is a continuous linear map,
then `g β f` has the finite power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFiniteFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFiniteFPowerSeriesOnBall f p x n r) :
HasFiniteFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x n r :=
β¨g.comp_hasFPowerSeriesOnBall h.1, fun m hm β¦ by
rw [compFormalMultilinearSeries_apply, h.finite m hm]
ext; exact map_zero gβ©
/-- If a function `f` is continuously polynomial on a set `s` and `g` is a continuous linear map,
then `g β f` is continuously polynomial on `s`. -/
theorem ContinuousLinearMap.comp_cPolynomialOn {s : Set E} (g : F βL[π] G)
(h : CPolynomialOn π f s) : CPolynomialOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, n, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, n, r, g.comp_hasFiniteFPowerSeriesOnBall hpβ©
/-- If a function admits a finite power series expansion bounded by `n`, then it is equal to
the `m`th partial sums of this power series at every point of the disk for `n β€ m`.-/
theorem HasFiniteFPowerSeriesOnBall.eq_partialSum
(hf : HasFiniteFPowerSeriesOnBall f p x n r) :
β y β EMetric.ball (0 : E) r, β m, n β€ m β
f (x + y) = p.partialSum m y :=
fun y hy m hm β¦ (hf.hasSum hy).unique (hasSum_sum_of_ne_finset_zero
(f := fun m => p m (fun _ => y)) (s := Finset.range m)
(fun N hN => by simp only; simp only [Finset.mem_range, not_lt] at hN
rw [hf.finite _ (le_trans hm hN), ContinuousMultilinearMap.zero_apply]))
/-- Variant of the previous result with the variable expressed as `y` instead of `x + y`.-/
theorem HasFiniteFPowerSeriesOnBall.eq_partialSum'
(hf : HasFiniteFPowerSeriesOnBall f p x n r) :
β y β EMetric.ball x r, β m, n β€ m β
f y = p.partialSum m (y - x) := by
intro y hy m hm
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, β mem_emetric_ball_zero_iff] at hy
rw [β (HasFiniteFPowerSeriesOnBall.eq_partialSum hf _ hy m hm), add_sub_cancel]
/-! The particular cases where `f` has a finite power series bounded by `0` or `1`.-/
/-- If `f` has a formal power series on a ball bounded by `0`, then `f` is equal to `0` on
the ball.-/
theorem HasFiniteFPowerSeriesOnBall.eq_zero_of_bound_zero
(hf : HasFiniteFPowerSeriesOnBall f pf x 0 r) : β y β EMetric.ball x r, f y = 0 := by
intro y hy
rw [hf.eq_partialSum' y hy 0 le_rfl, FormalMultilinearSeries.partialSum]
simp only [Finset.range_zero, Finset.sum_empty]
theorem HasFiniteFPowerSeriesOnBall.bound_zero_of_eq_zero (hf : β y β EMetric.ball x r, f y = 0)
(r_pos : 0 < r) (hp : β n, p n = 0) : HasFiniteFPowerSeriesOnBall f p x 0 r := by
refine β¨β¨?_, r_pos, ?_β©, fun n _ β¦ hp nβ©
Β· rw [p.radius_eq_top_of_forall_image_add_eq_zero 0 (fun n β¦ by rw [add_zero]; exact hp n)]
exact le_top
Β· intro y hy
rw [hf (x + y)]
Β· convert hasSum_zero
rw [hp, ContinuousMultilinearMap.zero_apply]
Β· rwa [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, add_comm, add_sub_cancel_right,
β edist_eq_coe_nnnorm, β EMetric.mem_ball]
/-- If `f` has a formal power series at `x` bounded by `0`, then `f` is equal to `0` in a
neighborhood of `x`.-/
theorem HasFiniteFPowerSeriesAt.eventually_zero_of_bound_zero
(hf : HasFiniteFPowerSeriesAt f pf x 0) : f =αΆ [π x] 0 :=
Filter.eventuallyEq_iff_exists_mem.mpr (let β¨r, hfβ© := hf; β¨EMetric.ball x r,
EMetric.ball_mem_nhds x hf.r_pos, fun y hy β¦ hf.eq_zero_of_bound_zero y hyβ©)
/-- If `f` has a formal power series on a ball bounded by `1`, then `f` is constant equal
to `f x` on the ball.-/
theorem HasFiniteFPowerSeriesOnBall.eq_const_of_bound_one
(hf : HasFiniteFPowerSeriesOnBall f pf x 1 r) : β y β EMetric.ball x r, f y = f x := by
intro y hy
rw [hf.eq_partialSum' y hy 1 le_rfl, hf.eq_partialSum' x
(by rw [EMetric.mem_ball, edist_self]; exact hf.r_pos) 1 le_rfl]
simp only [FormalMultilinearSeries.partialSum, Finset.range_one, Finset.sum_singleton]
congr
apply funext
simp only [IsEmpty.forall_iff]
/-- If `f` has a formal power series at x bounded by `1`, then `f` is constant equal
to `f x` in a neighborhood of `x`.-/
theorem HasFiniteFPowerSeriesAt.eventually_const_of_bound_one
(hf : HasFiniteFPowerSeriesAt f pf x 1) : f =αΆ [π x] (fun _ => f x) :=
Filter.eventuallyEq_iff_exists_mem.mpr (let β¨r, hfβ© := hf; β¨EMetric.ball x r,
EMetric.ball_mem_nhds x hf.r_pos, fun y hy β¦ hf.eq_const_of_bound_one y hyβ©)
/-- If a function admits a finite power series expansion on a disk, then it is continuous there. -/
protected theorem HasFiniteFPowerSeriesOnBall.continuousOn
(hf : HasFiniteFPowerSeriesOnBall f p x n r) :
ContinuousOn f (EMetric.ball x r) := hf.1.continuousOn
protected theorem HasFiniteFPowerSeriesAt.continuousAt (hf : HasFiniteFPowerSeriesAt f p x n) :
ContinuousAt f x := hf.toHasFPowerSeriesAt.continuousAt
protected theorem CPolynomialAt.continuousAt (hf : CPolynomialAt π f x) : ContinuousAt f x :=
hf.analyticAt.continuousAt
protected theorem CPolynomialOn.continuousOn {s : Set E} (hf : CPolynomialOn π f s) :
ContinuousOn f s :=
hf.analyticOn.continuousOn
/-- Continuously polynomial everywhere implies continuous -/
theorem CPolynomialOn.continuous {f : E β F} (fa : CPolynomialOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
protected theorem FormalMultilinearSeries.sum_of_finite (p : FormalMultilinearSeries π E F)
{n : β} (hn : β m, n β€ m β p m = 0) (x : E) :
p.sum x = p.partialSum n x :=
tsum_eq_sum fun m hm β¦ by rw [Finset.mem_range, not_lt] at hm; rw [hn m hm]; rfl
/-- A finite formal multilinear series sums to its sum at every point.-/
protected theorem FormalMultilinearSeries.hasSum_of_finite (p : FormalMultilinearSeries π E F)
{n : β} (hn : β m, n β€ m β p m = 0) (x : E) :
HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
summable_of_ne_finset_zero (fun m hm β¦ by rw [Finset.mem_range, not_lt] at hm; rw [hn m hm]; rfl)
|>.hasSum
/-- The sum of a finite power series `p` admits `p` as a power series.-/
protected theorem FormalMultilinearSeries.hasFiniteFPowerSeriesOnBall_of_finite
(p : FormalMultilinearSeries π E F) {n : β} (hn : β m, n β€ m β p m = 0) :
HasFiniteFPowerSeriesOnBall p.sum p 0 n β€ where
r_le := by rw [radius_eq_top_of_forall_image_add_eq_zero p n fun _ => hn _ (Nat.le_add_left _ _)]
r_pos := zero_lt_top
finite := hn
hasSum {y} _ := by rw [zero_add]; exact p.hasSum_of_finite hn y
theorem HasFiniteFPowerSeriesOnBall.sum (h : HasFiniteFPowerSeriesOnBall f p x n r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
/-- The sum of a finite power series is continuous. -/
protected theorem FormalMultilinearSeries.continuousOn_of_finite
(p : FormalMultilinearSeries π E F) {n : β} (hn : β m, n β€ m β p m = 0) :
Continuous p.sum := by
rw [continuous_iff_continuousOn_univ, β Metric.emetric_ball_top]
exact (p.hasFiniteFPowerSeriesOnBall_of_finite hn).continuousOn
end FiniteFPowerSeries
namespace FormalMultilinearSeries
section
/-! We study what happens when we change the origin of a finite formal multilinear series `p`. The
main point is that the new series `p.changeOrigin x` is still finite, with the same bound.-/
variable (p : FormalMultilinearSeries π E F) {x y : E} {r R : ββ₯0}
/-- If `p` is a formal multilinear series such that `p m = 0` for `n β€ m`, then
`p.changeOriginSeriesTerm k l = 0` for `n β€ k + l`. -/
lemma changeOriginSeriesTerm_bound (p : FormalMultilinearSeries π E F) {n : β}
(hn : β (m : β), n β€ m β p m = 0) (k l : β) {s : Finset (Fin (k + l))}
(hs : s.card = l) (hkl : n β€ k + l) :
p.changeOriginSeriesTerm k l s hs = 0 := by
rw [changeOriginSeriesTerm, hn _ hkl, map_zero]
/-- If `p` is a finite formal multilinear series, then so is `p.changeOriginSeries k` for every
`k` in `β`. More precisely, if `p m = 0` for `n β€ m`, then `p.changeOriginSeries k m = 0` for
`n β€ k + m`. -/
lemma changeOriginSeries_finite_of_finite (p : FormalMultilinearSeries π E F) {n : β}
(hn : β (m : β), n β€ m β p m = 0) (k : β) : β {m : β}, n β€ k + m β
p.changeOriginSeries k m = 0 := by
intro m hm
rw [changeOriginSeries]
exact Finset.sum_eq_zero (fun _ _ => p.changeOriginSeriesTerm_bound hn _ _ _ hm)
lemma changeOriginSeries_sum_eq_partialSum_of_finite (p : FormalMultilinearSeries π E F) {n : β}
(hn : β (m : β), n β€ m β p m = 0) (k : β) :
(p.changeOriginSeries k).sum = (p.changeOriginSeries k).partialSum (n - k) := by
ext x
rw [partialSum, FormalMultilinearSeries.sum,
tsum_eq_sum (f := fun m => p.changeOriginSeries k m (fun _ => x)) (s := Finset.range (n - k))]
intro m hm
rw [Finset.mem_range, not_lt] at hm
rw [p.changeOriginSeries_finite_of_finite hn k (by rw [add_comm]; exact Nat.le_add_of_sub_le hm),
ContinuousMultilinearMap.zero_apply]
/-- If `p` is a formal multilinear series such that `p m = 0` for `n β€ m`, then
`p.changeOrigin x k = 0` for `n β€ k`. -/
lemma changeOrigin_finite_of_finite (p : FormalMultilinearSeries π E F) {n : β}
(hn : β (m : β), n β€ m β p m = 0) {k : β} (hk : n β€ k) :
p.changeOrigin x k = 0 := by
rw [changeOrigin, p.changeOriginSeries_sum_eq_partialSum_of_finite hn]
apply Finset.sum_eq_zero
intro m hm
rw [Finset.mem_range] at hm
rw [p.changeOriginSeries_finite_of_finite hn k (le_add_of_le_left hk),
ContinuousMultilinearMap.zero_apply]
theorem hasFiniteFPowerSeriesOnBall_changeOrigin (p : FormalMultilinearSeries π E F) {n : β}
(k : β) (hn : β (m : β), n + k β€ m β p m = 0) :
HasFiniteFPowerSeriesOnBall (p.changeOrigin Β· k) (p.changeOriginSeries k) 0 n β€ :=
(p.changeOriginSeries k).hasFiniteFPowerSeriesOnBall_of_finite
(fun _ hm => p.changeOriginSeries_finite_of_finite hn k
(by rw [add_comm n k]; apply add_le_add_left hm))
theorem changeOrigin_eval_of_finite (p : FormalMultilinearSeries π E F) {n : β}
(hn : β (m : β), n β€ m β p m = 0) (x y : E) :
(p.changeOrigin x).sum y = p.sum (x + y) := by
let f (s : Ξ£ k l : β, { s : Finset (Fin (k + l)) // s.card = l }) : F :=
p.changeOriginSeriesTerm s.1 s.2.1 s.2.2 s.2.2.2 (fun _ β¦ x) fun _ β¦ y
have finsupp : f.support.Finite := by
apply Set.Finite.subset (s := changeOriginIndexEquiv β»ΒΉ' (Sigma.fst β»ΒΉ' {m | m < n}))
Β· apply Set.Finite.preimage ((Equiv.injective _).injOn _)
simp_rw [β {m | m < n}.iUnion_of_singleton_coe, preimage_iUnion, β range_sigmaMk]
exact finite_iUnion fun _ β¦ finite_range _
Β· refine fun s β¦ Not.imp_symm fun hs β¦ ?_
simp only [preimage_setOf_eq, changeOriginIndexEquiv_apply_fst, mem_setOf, not_lt] at hs
dsimp only [f]
rw [changeOriginSeriesTerm_bound p hn _ _ _ hs, ContinuousMultilinearMap.zero_apply,
ContinuousMultilinearMap.zero_apply]
have hfkl k l : HasSum (f β¨k, l, Β·β©) (changeOriginSeries p k l (fun _ β¦ x) fun _ β¦ y) := by
simp_rw [changeOriginSeries, ContinuousMultilinearMap.sum_apply]; apply hasSum_fintype
have hfk k : HasSum (f β¨k, Β·β©) (changeOrigin p x k fun _ β¦ y) := by
have (m) (hm : m β Finset.range n) : changeOriginSeries p k m (fun _ β¦ x) = 0 := by
rw [Finset.mem_range, not_lt] at hm
rw [changeOriginSeries_finite_of_finite _ hn _ (le_add_of_le_right hm),
ContinuousMultilinearMap.zero_apply]
rw [changeOrigin, FormalMultilinearSeries.sum,
ContinuousMultilinearMap.tsum_eval (summable_of_ne_finset_zero this)]
refine (summable_of_ne_finset_zero (s := Finset.range n) fun m hm β¦ ?_).hasSum.sigma_of_hasSum
(hfkl k) (summable_of_finite_support <| finsupp.preimage <| sigma_mk_injective.injOn _)
rw [this m hm, ContinuousMultilinearMap.zero_apply]
have hf : HasSum f ((p.changeOrigin x).sum y) :=
((p.changeOrigin x).hasSum_of_finite (fun _ β¦ changeOrigin_finite_of_finite p hn) _)
|>.sigma_of_hasSum hfk (summable_of_finite_support finsupp)
refine hf.unique (changeOriginIndexEquiv.symm.hasSum_iff.1 ?_)
refine (p.hasSum_of_finite hn (x + y)).sigma_of_hasSum (fun n β¦ ?_)
(changeOriginIndexEquiv.symm.summable_iff.2 hf.summable)
rw [β Pi.add_def, (p n).map_add_univ (fun _ β¦ x) fun _ β¦ y]
simp_rw [β changeOriginSeriesTerm_changeOriginIndexEquiv_symm]
exact hasSum_fintype fun c β¦ f (changeOriginIndexEquiv.symm β¨n, cβ©)
/-- The terms of the formal multilinear series `p.changeOrigin` are continuously polynomial
as we vary the origin -/
theorem cPolynomialAt_changeOrigin_of_finite (p : FormalMultilinearSeries π E F)
{n : β} (hn : β (m : β), n β€ m β p m = 0) (k : β) :
CPolynomialAt π (p.changeOrigin Β· k) 0 :=
(p.hasFiniteFPowerSeriesOnBall_changeOrigin k fun _ h β¦ hn _ (le_self_add.trans h)).cPolynomialAt
end
end FormalMultilinearSeries
section
variable {x y : E}
theorem HasFiniteFPowerSeriesOnBall.changeOrigin (hf : HasFiniteFPowerSeriesOnBall f p x n r)
(h : (βyββ : ββ₯0β) < r) :
HasFiniteFPowerSeriesOnBall f (p.changeOrigin y) (x + y) n (r - βyββ) where
r_le := (tsub_le_tsub_right hf.r_le _).trans p.changeOrigin_radius
r_pos := by simp [h]
finite _ hm := p.changeOrigin_finite_of_finite hf.finite hm
hasSum {z} hz := by
have : f (x + y + z) =
FormalMultilinearSeries.sum (FormalMultilinearSeries.changeOrigin p y) z := by
rw [mem_emetric_ball_zero_iff, lt_tsub_iff_right, add_comm] at hz
rw [p.changeOrigin_eval_of_finite hf.finite, add_assoc, hf.sum]
refine' mem_emetric_ball_zero_iff.2 (lt_of_le_of_lt _ hz)
exact mod_cast nnnorm_add_le y z
rw [this]
apply (p.changeOrigin y).hasSum_of_finite fun _ => p.changeOrigin_finite_of_finite hf.finite
/-- If a function admits a finite power series expansion `p` on an open ball `B (x, r)`, then
it is continuously polynomial at every point of this ball. -/
theorem HasFiniteFPowerSeriesOnBall.cPolynomialAt_of_mem
(hf : HasFiniteFPowerSeriesOnBall f p x n r) (h : y β EMetric.ball x r) :
CPolynomialAt π f y := by
have : (βy - xββ : ββ₯0β) < r := by simpa [edist_eq_coe_nnnorm_sub] using h
have := hf.changeOrigin this
rw [add_sub_cancel] at this
exact this.cPolynomialAt
theorem HasFiniteFPowerSeriesOnBall.cPolynomialOn (hf : HasFiniteFPowerSeriesOnBall f p x n r) :
CPolynomialOn π f (EMetric.ball x r) :=
fun _y hy => hf.cPolynomialAt_of_mem hy
variable (π f)
/-- For any function `f` from a normed vector space to a normed vector space, the set of points
`x` such that `f` is continuously polynomial at `x` is open. -/
theorem isOpen_cPolynomialAt : IsOpen { x | CPolynomialAt π f x } := by
rw [isOpen_iff_mem_nhds]
rintro x β¨p, n, r, hrβ©
exact mem_of_superset (EMetric.ball_mem_nhds _ hr.r_pos) fun y hy => hr.cPolynomialAt_of_mem hy
variable {π}
theorem CPolynomialAt.eventually_cPolynomialAt {f : E β F} {x : E} (h : CPolynomialAt π f x) :
βαΆ y in π x, CPolynomialAt π f y :=
(isOpen_cPolynomialAt π f).mem_nhds h
theorem CPolynomialAt.exists_mem_nhds_cPolynomialOn {f : E β F} {x : E} (h : CPolynomialAt π f x) :
β s β π x, CPolynomialOn π f s :=
h.eventually_cPolynomialAt.exists_mem
/-- If `f` is continuously polynomial at a point, then it is continuously polynomial in a
nonempty ball around that point.-/
theorem CPolynomialAt.exists_ball_cPolynomialOn {f : E β F} {x : E} (h : CPolynomialAt π f x) :
β r : β, 0 < r β§ CPolynomialOn π f (Metric.ball x r) :=
Metric.isOpen_iff.mp (isOpen_cPolynomialAt _ _) _ h
end