state
stringlengths 0
159k
| srcUpToTactic
stringlengths 387
167k
| nextTactic
stringlengths 3
9k
| declUpToTactic
stringlengths 22
11.5k
| declId
stringlengths 38
95
| decl
stringlengths 16
1.89k
| file_tag
stringlengths 17
73
|
---|---|---|---|---|---|---|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
y : E Γ E
hy' : βy - (x, x)ββ < r'
hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r
A : β β F := fun n => ((p n) fun x_1 => y.1 - x) - (p n) fun x_1 => y.2 - x
hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - (p 1) fun x => y.1 - y.2)
B : β β β := fun n => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((βn + 2) * a ^ n)
n : β
β’ C * (a * (a * a ^ n)) * βr' ^ n * ((βn + 2) * βy - (x, x)β * βy.1 - y.2β) * (βr' * βr') =
C * (a * a) * (βy - (x, x)β * βy.1 - y.2β) * ((βn + 2) * a ^ n) * (βr' * (βr' * βr' ^ n))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
|
simp only [mul_assoc, mul_comm, mul_left_comm]
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
y : E Γ E
hy' : βy - (x, x)ββ < r'
hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r
A : β β F := fun n => ((p n) fun x_1 => y.1 - x) - (p n) fun x_1 => y.2 - x
hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - (p 1) fun x => y.1 - y.2)
B : β β β := fun n => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((βn + 2) * a ^ n)
hAB : β (n : β), βA (n + 2)β β€ B n
β’ βf y.1 - f y.2 - (p 1) fun x => y.1 - y.2β β€ L y
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
|
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
y : E Γ E
hy' : βy - (x, x)ββ < r'
hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r
A : β β F := fun n => ((p n) fun x_1 => y.1 - x) - (p n) fun x_1 => y.2 - x
hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - (p 1) fun x => y.1 - y.2)
B : β β β := fun n => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((βn + 2) * a ^ n)
hAB : β (n : β), βA (n + 2)β β€ B n
β’ HasSum B (L y)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
|
apply HasSum.mul_left
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
case h
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
y : E Γ E
hy' : βy - (x, x)ββ < r'
hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r
A : β β F := fun n => ((p n) fun x_1 => y.1 - x) - (p n) fun x_1 => y.2 - x
hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - (p 1) fun x => y.1 - y.2)
B : β β β := fun n => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((βn + 2) * a ^ n)
hAB : β (n : β), βA (n + 2)β β€ B n
β’ HasSum (fun i => (βi + 2) * a ^ i) (a / (1 - a) ^ 2 + 2 / (1 - a))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
|
simp only [add_mul]
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
case h
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
y : E Γ E
hy' : βy - (x, x)ββ < r'
hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r
A : β β F := fun n => ((p n) fun x_1 => y.1 - x) - (p n) fun x_1 => y.2 - x
hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - (p 1) fun x => y.1 - y.2)
B : β β β := fun n => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((βn + 2) * a ^ n)
hAB : β (n : β), βA (n + 2)β β€ B n
β’ HasSum (fun i => βi * a ^ i + 2 * a ^ i) (a / (1 - a) ^ 2 + 2 / (1 - a))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
|
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
y : E Γ E
hy' : βy - (x, x)ββ < r'
hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r
A : β β F := fun n => ((p n) fun x_1 => y.1 - x) - (p n) fun x_1 => y.2 - x
hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - (p 1) fun x => y.1 - y.2)
B : β β β := fun n => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((βn + 2) * a ^ n)
hAB : β (n : β), βA (n + 2)β β€ B n
β’ βaβ < 1
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by
|
simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
case h
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
y : E Γ E
hy' : βy - (x, x)ββ < r'
hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r
A : β β F := fun n => ((p n) fun x_1 => y.1 - x) - (p n) fun x_1 => y.2 - x
hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - (p 1) fun x => y.1 - y.2)
B : β β β := fun n => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((βn + 2) * a ^ n)
hAB : β (n : β), βA (n + 2)β β€ B n
this : βaβ < 1
β’ HasSum (fun i => βi * a ^ i + 2 * a ^ i) (a / (1 - a) ^ 2 + 2 / (1 - a))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
|
rw [div_eq_mul_inv, div_eq_mul_inv]
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
case h
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
y : E Γ E
hy' : βy - (x, x)ββ < r'
hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r
A : β β F := fun n => ((p n) fun x_1 => y.1 - x) - (p n) fun x_1 => y.2 - x
hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - (p 1) fun x => y.1 - y.2)
B : β β β := fun n => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((βn + 2) * a ^ n)
hAB : β (n : β), βA (n + 2)β β€ B n
this : βaβ < 1
β’ HasSum (fun i => βi * a ^ i + 2 * a ^ i) (a * ((1 - a) ^ 2)β»ΒΉ + 2 * (1 - a)β»ΒΉ)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
|
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
y : E Γ E
hy' : βy - (x, x)ββ < r'
hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r
A : β β F := fun n => ((p n) fun x_1 => y.1 - x) - (p n) fun x_1 => y.2 - x
hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - (p 1) fun x => y.1 - y.2)
B : β β β := fun n => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((βn + 2) * a ^ n)
hAB : β (n : β), βA (n + 2)β β€ B n
hBL : HasSum B (L y)
β’ βf y.1 - f y.2 - (p 1) fun x => y.1 - y.2β β€ L y
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
|
exact hA.norm_le_of_bounded hBL hAB
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
case intro.inr.intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
hL : β y β EMetric.ball (x, x) βr', βf y.1 - f y.2 - (p 1) fun x => y.1 - y.2β β€ L y
β’ (fun y => f y.1 - f y.2 - (p 1) fun x => y.1 - y.2) =O[π (EMetric.ball (x, x) βr')] fun y =>
βy - (x, x)β * βy.1 - y.2β
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
|
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
hL : β y β EMetric.ball (x, x) βr', βf y.1 - f y.2 - (p 1) fun x => y.1 - y.2β β€ L y
this : L =O[π (EMetric.ball (x, x) βr')] fun y => βy - (x, x)β * βy.1 - y.2β
β’ (fun y => f y.1 - f y.2 - (p 1) fun x => y.1 - y.2) =O[π (EMetric.ball (x, x) βr')] fun y =>
βy - (x, x)β * βy.1 - y.2β
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
|
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
hL : β y β EMetric.ball (x, x) βr', βf y.1 - f y.2 - (p 1) fun x => y.1 - y.2β β€ L y
this : L =O[π (EMetric.ball (x, x) βr')] fun y => βy - (x, x)β * βy.1 - y.2β
y : E Γ E
hy : y β EMetric.ball (x, x) βr'
β’ βf y.1 - f y.2 - (p 1) fun x => y.1 - y.2β β€ 1 * βL yβ
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
|
rw [one_mul]
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
hL : β y β EMetric.ball (x, x) βr', βf y.1 - f y.2 - (p 1) fun x => y.1 - y.2β β€ L y
this : L =O[π (EMetric.ball (x, x) βr')] fun y => βy - (x, x)β * βy.1 - y.2β
y : E Γ E
hy : y β EMetric.ball (x, x) βr'
β’ βf y.1 - f y.2 - (p 1) fun x => y.1 - y.2β β€ βL yβ
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
|
exact (hL y hy).trans (le_abs_self _)
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
case intro.inr.intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
hL : β y β EMetric.ball (x, x) βr', βf y.1 - f y.2 - (p 1) fun x => y.1 - y.2β β€ L y
β’ L =O[π (EMetric.ball (x, x) βr')] fun y => βy - (x, x)β * βy.1 - y.2β
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
|
simp_rw [mul_right_comm _ (_ * _)]
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
case intro.inr.intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
hr : βr' < r
hr'0 : 0 < r'
a : β
ha : a β Ioo 0 1
C : β
hC : 0 < C
hp : β (n : β), βp nβ β€ C * a ^ n / βr' ^ n
L : E Γ E β β := fun y => C * (a / βr') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
hL : β y β EMetric.ball (x, x) βr', βf y.1 - f y.2 - (p 1) fun x => y.1 - y.2β β€ L y
β’ (fun y =>
C * (a / βr') ^ 2 * (a / (1 - a) ^ 2 + 2 / (1 - a)) *
(βy - (x, x)β * βy.1 - y.2β)) =O[π (EMetric.ball (x, x) βr')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
|
exact (isBigO_refl _ _).const_mul_left _
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
|
Mathlib.Analysis.Analytic.Basic.729_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
hr : r' < r
β’ β C,
β y β EMetric.ball x r',
β z β EMetric.ball x r', βf y - f z - (p 1) fun x => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
|
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
|
Mathlib.Analysis.Analytic.Basic.800_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesAt f p x
β’ (fun y => f y.1 - f y.2 - (p 1) fun x => y.1 - y.2) =O[π (x, x)] fun y => βy - (x, x)β * βy.1 - y.2β
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
|
rcases hf with β¨r, hfβ©
|
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
|
Mathlib.Analysis.Analytic.Basic.812_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
case intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
rβ r' r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
β’ (fun y => f y.1 - f y.2 - (p 1) fun x => y.1 - y.2) =O[π (x, x)] fun y => βy - (x, x)β * βy.1 - y.2β
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
|
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
|
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
|
Mathlib.Analysis.Analytic.Basic.812_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
rβ r'β r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
r'0 : 0 < βr'
h : βr' < r
β’ (fun y => f y.1 - f y.2 - (p 1) fun x => y.1 - y.2) =O[π (x, x)] fun y => βy - (x, x)β * βy.1 - y.2β
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
|
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
|
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
|
Mathlib.Analysis.Analytic.Basic.812_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
rβ r'β r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
r'0 : 0 < βr'
h : βr' < r
β’ π (x, x) β€ π (EMetric.ball (x, x) βr')
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
|
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
|
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
|
Mathlib.Analysis.Analytic.Basic.812_0.jQw1fRSE1vGpOll
|
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
β’ TendstoUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n y) (fun y => f (x + y)) atTop
(Metric.ball 0 βr')
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
|
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
|
Mathlib.Analysis.Analytic.Basic.825_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
β’ β a β Ioo 0 1,
β C > 0, β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * a ^ n
case intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
a : β
ha : a β Ioo 0 1
C : β
hp : β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * a ^ n
β’ TendstoUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n y) (fun y => f (x + y)) atTop
(Metric.ball 0 βr')
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
|
exact hf.uniform_geometric_approx h
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
|
Mathlib.Analysis.Analytic.Basic.825_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
a : β
ha : a β Ioo 0 1
C : β
hp : β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * a ^ n
β’ TendstoUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n y) (fun y => f (x + y)) atTop
(Metric.ball 0 βr')
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
|
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
|
Mathlib.Analysis.Analytic.Basic.825_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
a : β
ha : a β Ioo 0 1
C : β
hp : β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * a ^ n
Ξ΅ : β
Ξ΅pos : Ξ΅ > 0
β’ βαΆ (n : β) in atTop, β x_1 β Metric.ball 0 βr', dist (f (x + x_1)) (FormalMultilinearSeries.partialSum p n x_1) < Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
|
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
|
Mathlib.Analysis.Analytic.Basic.825_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
a : β
ha : a β Ioo 0 1
C : β
hp : β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * a ^ n
Ξ΅ : β
Ξ΅pos : Ξ΅ > 0
L : Tendsto (fun n => C * a ^ n) atTop (π (C * 0))
β’ βαΆ (n : β) in atTop, β x_1 β Metric.ball 0 βr', dist (f (x + x_1)) (FormalMultilinearSeries.partialSum p n x_1) < Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
|
rw [mul_zero] at L
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
|
Mathlib.Analysis.Analytic.Basic.825_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
a : β
ha : a β Ioo 0 1
C : β
hp : β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * a ^ n
Ξ΅ : β
Ξ΅pos : Ξ΅ > 0
L : Tendsto (fun n => C * a ^ n) atTop (π 0)
β’ βαΆ (n : β) in atTop, β x_1 β Metric.ball 0 βr', dist (f (x + x_1)) (FormalMultilinearSeries.partialSum p n x_1) < Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
|
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
|
Mathlib.Analysis.Analytic.Basic.825_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
a : β
ha : a β Ioo 0 1
C : β
hp : β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * a ^ n
Ξ΅ : β
Ξ΅pos : Ξ΅ > 0
L : Tendsto (fun n => C * a ^ n) atTop (π 0)
n : β
hn : C * a ^ n < Ξ΅
y : E
hy : y β Metric.ball 0 βr'
β’ dist (f (x + y)) (FormalMultilinearSeries.partialSum p n y) < Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
|
rw [dist_eq_norm]
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
|
Mathlib.Analysis.Analytic.Basic.825_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
a : β
ha : a β Ioo 0 1
C : β
hp : β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * a ^ n
Ξ΅ : β
Ξ΅pos : Ξ΅ > 0
L : Tendsto (fun n => C * a ^ n) atTop (π 0)
n : β
hn : C * a ^ n < Ξ΅
y : E
hy : y β Metric.ball 0 βr'
β’ βf (x + y) - FormalMultilinearSeries.partialSum p n yβ < Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
|
exact (hp y hy n).trans_lt hn
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
|
Mathlib.Analysis.Analytic.Basic.825_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
β’ TendstoLocallyUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n y) (fun y => f (x + y)) atTop
(EMetric.ball 0 r)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
|
intro u hu x hx
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
|
Mathlib.Analysis.Analytic.Basic.844_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
xβ : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p xβ r
u : Set (F Γ F)
hu : u β uniformity F
x : E
hx : x β EMetric.ball 0 r
β’ β t β π[EMetric.ball 0 r] x,
βαΆ (n : β) in atTop,
β y β t, ((fun y => f (xβ + y)) y, (fun n y => FormalMultilinearSeries.partialSum p n y) n y) β u
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
|
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
|
Mathlib.Analysis.Analytic.Basic.844_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
xβ : E
r r'β : ββ₯0β
hf : HasFPowerSeriesOnBall f p xβ r
u : Set (F Γ F)
hu : u β uniformity F
x : E
hx : x β EMetric.ball 0 r
r' : ββ₯0
xr' : edist x 0 < βr'
hr' : βr' < r
β’ β t β π[EMetric.ball 0 r] x,
βαΆ (n : β) in atTop,
β y β t, ((fun y => f (xβ + y)) y, (fun n y => FormalMultilinearSeries.partialSum p n y) n y) β u
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
|
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
|
Mathlib.Analysis.Analytic.Basic.844_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
xβ : E
r r'β : ββ₯0β
hf : HasFPowerSeriesOnBall f p xβ r
u : Set (F Γ F)
hu : u β uniformity F
x : E
hx : x β EMetric.ball 0 r
r' : ββ₯0
xr' : edist x 0 < βr'
hr' : βr' < r
this : EMetric.ball 0 βr' β π x
β’ β t β π[EMetric.ball 0 r] x,
βαΆ (n : β) in atTop,
β y β t, ((fun y => f (xβ + y)) y, (fun n y => FormalMultilinearSeries.partialSum p n y) n y) β u
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
|
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
|
Mathlib.Analysis.Analytic.Basic.844_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
xβ : E
r r'β : ββ₯0β
hf : HasFPowerSeriesOnBall f p xβ r
u : Set (F Γ F)
hu : u β uniformity F
x : E
hx : x β EMetric.ball 0 r
r' : ββ₯0
xr' : edist x 0 < βr'
hr' : βr' < r
this : EMetric.ball 0 βr' β π x
β’ βαΆ (n : β) in atTop,
β y β EMetric.ball 0 βr', ((fun y => f (xβ + y)) y, (fun n y => FormalMultilinearSeries.partialSum p n y) n y) β u
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
|
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
|
Mathlib.Analysis.Analytic.Basic.844_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
β’ TendstoUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n (y - x)) f atTop (Metric.ball x βr')
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
|
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
|
Mathlib.Analysis.Analytic.Basic.857_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
case h.e'_6
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
β’ f = (fun y => f (x + y)) β fun y => y - x
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β·
|
simp [(Β· β Β·)]
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β·
|
Mathlib.Analysis.Analytic.Basic.857_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
case h.e'_8
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
β’ Metric.ball x βr' = (fun y => y - x) β»ΒΉ' Metric.ball 0 βr'
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β·
|
ext z
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β·
|
Mathlib.Analysis.Analytic.Basic.857_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
case h.e'_8.h
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
z : E
β’ z β Metric.ball x βr' β z β (fun y => y - x) β»ΒΉ' Metric.ball 0 βr'
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
|
simp [dist_eq_norm]
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
|
Mathlib.Analysis.Analytic.Basic.857_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r')
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
β’ TendstoLocallyUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n (y - x)) f atTop (EMetric.ball x r)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
|
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
|
Mathlib.Analysis.Analytic.Basic.869_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
A : ContinuousOn (fun y => y - x) (EMetric.ball x r)
β’ TendstoLocallyUniformlyOn (fun n y => FormalMultilinearSeries.partialSum p n (y - x)) f atTop (EMetric.ball x r)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
|
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
|
Mathlib.Analysis.Analytic.Basic.869_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
case h.e'_7
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
A : ContinuousOn (fun y => y - x) (EMetric.ball x r)
β’ f = (fun y => f (x + y)) β fun y => y - x
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β·
|
ext z
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β·
|
Mathlib.Analysis.Analytic.Basic.869_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
case h.e'_7.h
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
A : ContinuousOn (fun y => y - x) (EMetric.ball x r)
z : E
β’ f z = ((fun y => f (x + y)) β fun y => y - x) z
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
|
simp
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
|
Mathlib.Analysis.Analytic.Basic.869_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
A : ContinuousOn (fun y => y - x) (EMetric.ball x r)
β’ MapsTo (fun y => y - x) (EMetric.ball x r) (EMetric.ball 0 r)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β·
|
intro z
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β·
|
Mathlib.Analysis.Analytic.Basic.869_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
A : ContinuousOn (fun y => y - x) (EMetric.ball x r)
z : E
β’ z β EMetric.ball x r β (fun y => y - x) z β EMetric.ball 0 r
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
|
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
|
Mathlib.Analysis.Analytic.Basic.869_0.jQw1fRSE1vGpOll
|
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r)
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
fβ g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
f : E β F
fa : AnalyticOn π f univ
β’ Continuous f
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
|
rw [continuous_iff_continuousOn_univ]
|
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
|
Mathlib.Analysis.Analytic.Basic.907_0.jQw1fRSE1vGpOll
|
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
fβ g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
f : E β F
fa : AnalyticOn π f univ
β’ ContinuousOn f univ
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ];
|
exact fa.continuousOn
|
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ];
|
Mathlib.Analysis.Analytic.Basic.907_0.jQw1fRSE1vGpOll
|
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββ· : NontriviallyNormedField π
instββΆ : NormedAddCommGroup E
instββ΅ : NormedSpace π E
instββ΄ : NormedAddCommGroup F
instβΒ³ : NormedSpace π F
instβΒ² : NormedAddCommGroup G
instβΒΉ : NormedSpace π G
f g : E β F
pβ pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
instβ : CompleteSpace F
p : FormalMultilinearSeries π E F
h : 0 < radius p
yβ : E
hy : yβ β EMetric.ball 0 (radius p)
β’ HasSum (fun n => (p n) fun x => yβ) (FormalMultilinearSeries.sum p (0 + yβ))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
|
rw [zero_add]
|
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
|
Mathlib.Analysis.Analytic.Basic.911_0.jQw1fRSE1vGpOll
|
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββ· : NontriviallyNormedField π
instββΆ : NormedAddCommGroup E
instββ΅ : NormedSpace π E
instββ΄ : NormedAddCommGroup F
instβΒ³ : NormedSpace π F
instβΒ² : NormedAddCommGroup G
instβΒΉ : NormedSpace π G
f g : E β F
pβ pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
instβ : CompleteSpace F
p : FormalMultilinearSeries π E F
h : 0 < radius p
yβ : E
hy : yβ β EMetric.ball 0 (radius p)
β’ HasSum (fun n => (p n) fun x => yβ) (FormalMultilinearSeries.sum p yβ)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
|
exact p.hasSum hy
|
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
|
Mathlib.Analysis.Analytic.Basic.911_0.jQw1fRSE1vGpOll
|
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββ· : NontriviallyNormedField π
instββΆ : NormedAddCommGroup E
instββ΅ : NormedSpace π E
instββ΄ : NormedAddCommGroup F
instβΒ³ : NormedSpace π F
instβΒ² : NormedAddCommGroup G
instβΒΉ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
instβ : CompleteSpace F
β’ ContinuousOn (FormalMultilinearSeries.sum p) (EMetric.ball 0 (radius p))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
|
rcases (zero_le p.radius).eq_or_lt with h | h
|
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
|
Mathlib.Analysis.Analytic.Basic.928_0.jQw1fRSE1vGpOll
|
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius)
|
Mathlib_Analysis_Analytic_Basic
|
case inl
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββ· : NontriviallyNormedField π
instββΆ : NormedAddCommGroup E
instββ΅ : NormedSpace π E
instββ΄ : NormedAddCommGroup F
instβΒ³ : NormedSpace π F
instβΒ² : NormedAddCommGroup G
instβΒΉ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
instβ : CompleteSpace F
h : 0 = radius p
β’ ContinuousOn (FormalMultilinearSeries.sum p) (EMetric.ball 0 (radius p))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β·
|
simp [β h, continuousOn_empty]
|
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β·
|
Mathlib.Analysis.Analytic.Basic.928_0.jQw1fRSE1vGpOll
|
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius)
|
Mathlib_Analysis_Analytic_Basic
|
case inr
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββ· : NontriviallyNormedField π
instββΆ : NormedAddCommGroup E
instββ΅ : NormedSpace π E
instββ΄ : NormedAddCommGroup F
instβΒ³ : NormedSpace π F
instβΒ² : NormedAddCommGroup G
instβΒΉ : NormedSpace π G
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
instβ : CompleteSpace F
h : 0 < radius p
β’ ContinuousOn (FormalMultilinearSeries.sum p) (EMetric.ball 0 (radius p))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β·
|
exact (p.hasFPowerSeriesOnBall h).continuousOn
|
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β·
|
Mathlib.Analysis.Analytic.Basic.928_0.jQw1fRSE1vGpOll
|
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius)
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
n : β
p : ContinuousMultilinearMap π (fun i => E) F
h : (fun y => p fun x => y) =O[π 0] fun y => βyβ ^ (n + 1)
y : E
β’ (p fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
|
obtain β¨c, c_pos, hcβ© := h.exists_pos
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
n : β
p : ContinuousMultilinearMap π (fun i => E) F
h : (fun y => p fun x => y) =O[π 0] fun y => βyβ ^ (n + 1)
y : E
c : β
c_pos : c > 0
hc : IsBigOWith c (π 0) (fun y => p fun x => y) fun y => βyβ ^ (n + 1)
β’ (p fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
|
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
n : β
p : ContinuousMultilinearMap π (fun i => E) F
h : (fun y => p fun x => y) =O[π 0] fun y => βyβ ^ (n + 1)
y : E
c : β
c_pos : c > 0
hc : IsBigOWith c (π 0) (fun y => p fun x => y) fun y => βyβ ^ (n + 1)
t : Set E
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (n + 1)β
t_open : IsOpen t
z_mem : 0 β t
β’ (p fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
|
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
n : β
p : ContinuousMultilinearMap π (fun i => E) F
h : (fun y => p fun x => y) =O[π 0] fun y => βyβ ^ (n + 1)
y : E
c : β
c_pos : c > 0
hc : IsBigOWith c (π 0) (fun y => p fun x => y) fun y => βyβ ^ (n + 1)
t : Set E
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (n + 1)β
t_open : IsOpen t
z_mem : 0 β t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
β’ (p fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
|
clear h hc z_mem
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
n : β
p : ContinuousMultilinearMap π (fun i => E) F
y : E
c : β
c_pos : c > 0
t : Set E
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (n + 1)β
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
β’ (p fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
|
cases' n with n
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro.zero
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.zero + 1)β
β’ (p fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β·
|
exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β·
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.zero + 1)β
β’ βp fun x => yβ = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
|
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos))
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro.succ
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
β’ (p fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β·
|
refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β·
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : y = 0
β’ (p fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by
|
simpa only [hy] using p.map_zero
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro.succ
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : Β¬y = 0
β’ (p fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
|
replace hy := norm_pos_iff.mpr hy
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro.succ
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
β’ (p fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
|
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro.succ
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
β’ βp fun x => yβ β€ 0 + Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
|
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro.succ
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
β’ βp fun x => yβ β€ 0 + Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
|
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro.succ.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
β’ βp fun x => yβ β€ 0 + Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
|
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
β’ βk β’ yβ < Ξ΄
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
|
rw [norm_smul]
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
β’ βkβ * βyβ < Ξ΄
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
|
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro.succ.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
β’ βp fun x => yβ β€ 0 + Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
|
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
β’ βp fun x => k β’ yβ β€ c * βk β’ yβ ^ (Nat.succ n + 1)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
|
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
β’ c * βk β’ yβ ^ (Nat.succ n + 1) = βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
|
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
β’ c * (βkβ ^ (n + 1 + 1) * βyβ ^ (n + 1 + 1)) = βkβ ^ (n + 1) * (βkβ * (c * βyβ ^ (n + 1 + 1)))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
|
ring
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro.succ.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
hβ : βp fun x => k β’ yβ β€ βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
β’ βp fun x => yβ β€ 0 + Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
|
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.intro.intro.intro.succ.intro.intro
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
hβ : βp fun x => k β’ yβ β€ βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
hβ : βkβ * (c * βyβ ^ (Nat.succ n + 1)) < Ξ΅
β’ βp fun x => yβ β€ 0 + Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
|
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
hβ : βp fun x => k β’ yβ β€ βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
hβ : βkβ * (c * βyβ ^ (Nat.succ n + 1)) < Ξ΅
β’ βp fun x => yβ = βkβ»ΒΉ ^ Nat.succ nβ * βp fun x => k β’ yβ
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
|
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
hβ : βp fun x => k β’ yβ β€ βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
hβ : βkβ * (c * βyβ ^ (Nat.succ n + 1)) < Ξ΅
β’ βkβ»ΒΉ ^ Nat.succ nβ * βp fun x => k β’ yβ β€
βkβ»ΒΉ ^ Nat.succ nβ * (βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1))))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by
|
gcongr
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
hβ : βp fun x => k β’ yβ β€ βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
hβ : βkβ * (c * βyβ ^ (Nat.succ n + 1)) < Ξ΅
β’ βkβ»ΒΉ ^ Nat.succ nβ * (βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))) =
β(kβ»ΒΉ * k) ^ Nat.succ nβ * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
|
rw [β mul_assoc]
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
hβ : βp fun x => k β’ yβ β€ βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
hβ : βkβ * (c * βyβ ^ (Nat.succ n + 1)) < Ξ΅
β’ βkβ»ΒΉ ^ Nat.succ nβ * βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1))) =
β(kβ»ΒΉ * k) ^ Nat.succ nβ * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
|
simp [norm_mul, mul_pow]
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
hβ : βp fun x => k β’ yβ β€ βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
hβ : βkβ * (c * βyβ ^ (Nat.succ n + 1)) < Ξ΅
β’ β(kβ»ΒΉ * k) ^ Nat.succ nβ * (βkβ * (c * βyβ ^ (Nat.succ n + 1))) β€ 0 + Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
|
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
y : E
c : β
c_pos : c > 0
t : Set E
t_open : IsOpen t
Ξ΄ : β
Ξ΄_pos : Ξ΄ > 0
δΡ : Metric.ball 0 Ξ΄ β t
n : β
p : ContinuousMultilinearMap π (fun i => E) F
ht : β x β t, βp fun x_1 => xβ β€ c * ββxβ ^ (Nat.succ n + 1)β
hy : 0 < βyβ
Ξ΅ : β
Ξ΅_pos : 0 < Ξ΅
hβ : 0 < c * βyβ ^ (Nat.succ n + 1)
k : π
k_pos : 0 < βkβ
k_norm : βkβ < min (Ξ΄ * βyββ»ΒΉ) (Ξ΅ * (c * βyβ ^ (Nat.succ n + 1))β»ΒΉ)
hβ : βk β’ yβ < Ξ΄
hβ : βp fun x => k β’ yβ β€ βkβ ^ Nat.succ n * (βkβ * (c * βyβ ^ (Nat.succ n + 1)))
hβ : βkβ * (c * βyβ ^ (Nat.succ n + 1)) < Ξ΅
β’ β1 ^ Nat.succ nβ * (βkβ * (c * βyβ ^ (Nat.succ n + 1))) β€ 0 + Ξ΅
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
|
simpa using hβ.le
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
|
Mathlib.Analysis.Analytic.Basic.954_0.jQw1fRSE1vGpOll
|
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x : E
h : HasFPowerSeriesAt 0 p x
n : β
β’ β (y : E), ((p n) fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
|
refine' Nat.strong_induction_on n fun k hk => _
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
|
Mathlib.Analysis.Analytic.Basic.1007_0.jQw1fRSE1vGpOll
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x : E
h : HasFPowerSeriesAt 0 p x
n k : β
hk : β m < k, β (y : E), ((p m) fun x => y) = 0
β’ β (y : E), ((p k) fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
|
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
|
Mathlib.Analysis.Analytic.Basic.1007_0.jQw1fRSE1vGpOll
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x : E
h : HasFPowerSeriesAt 0 p x
n k : β
hk : β m < k, β (y : E), ((p m) fun x => y) = 0
β’ FormalMultilinearSeries.partialSum p (k + 1) = fun y => (p k) fun x => y
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
|
funext z
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
|
Mathlib.Analysis.Analytic.Basic.1007_0.jQw1fRSE1vGpOll
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case h
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x : E
h : HasFPowerSeriesAt 0 p x
n k : β
hk : β m < k, β (y : E), ((p m) fun x => y) = 0
z : E
β’ FormalMultilinearSeries.partialSum p (k + 1) z = (p k) fun x => z
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
|
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
|
Mathlib.Analysis.Analytic.Basic.1007_0.jQw1fRSE1vGpOll
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case h.refine'_1
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x : E
h : HasFPowerSeriesAt 0 p x
n k : β
hk : β m < k, β (y : E), ((p m) fun x => y) = 0
z : E
b : β
hb : b β Finset.range (k + 1)
hnb : b β k
β’ ((p b) fun x => z) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β·
|
have := Finset.mem_range_succ_iff.mp hb
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β·
|
Mathlib.Analysis.Analytic.Basic.1007_0.jQw1fRSE1vGpOll
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case h.refine'_1
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x : E
h : HasFPowerSeriesAt 0 p x
n k : β
hk : β m < k, β (y : E), ((p m) fun x => y) = 0
z : E
b : β
hb : b β Finset.range (k + 1)
hnb : b β k
this : b β€ k
β’ ((p b) fun x => z) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
|
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
|
Mathlib.Analysis.Analytic.Basic.1007_0.jQw1fRSE1vGpOll
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
case h.refine'_2
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x : E
h : HasFPowerSeriesAt 0 p x
n k : β
hk : β m < k, β (y : E), ((p m) fun x => y) = 0
z : E
hn : k β Finset.range (k + 1)
β’ ((p k) fun x => z) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β·
|
exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β·
|
Mathlib.Analysis.Analytic.Basic.1007_0.jQw1fRSE1vGpOll
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x : E
h : HasFPowerSeriesAt 0 p x
n k : β
hk : β m < k, β (y : E), ((p m) fun x => y) = 0
psum_eq : FormalMultilinearSeries.partialSum p (k + 1) = fun y => (p k) fun x => y
β’ β (y : E), ((p k) fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
|
replace h := h.isBigO_sub_partialSum_pow k.succ
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
|
Mathlib.Analysis.Analytic.Basic.1007_0.jQw1fRSE1vGpOll
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x : E
n k : β
hk : β m < k, β (y : E), ((p m) fun x => y) = 0
psum_eq : FormalMultilinearSeries.partialSum p (k + 1) = fun y => (p k) fun x => y
h :
(fun y => OfNat.ofNat 0 (x + y) - FormalMultilinearSeries.partialSum p (Nat.succ k) y) =O[π 0] fun y =>
βyβ ^ Nat.succ k
β’ β (y : E), ((p k) fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
|
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
|
Mathlib.Analysis.Analytic.Basic.1007_0.jQw1fRSE1vGpOll
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x : E
n k : β
hk : β m < k, β (y : E), ((p m) fun x => y) = 0
psum_eq : FormalMultilinearSeries.partialSum p (k + 1) = fun y => (p k) fun x => y
h : (fun x => (p k) fun x_1 => x) =O[π 0] fun y => βyβ ^ Nat.succ k
β’ β (y : E), ((p k) fun x => y) = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
|
exact h.continuousMultilinearMap_apply_eq_zero
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
|
Mathlib.Analysis.Analytic.Basic.1007_0.jQw1fRSE1vGpOll
|
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π π E
x : π
h : HasFPowerSeriesAt 0 p x
β’ p = 0
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
|
funext n
|
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
|
Mathlib.Analysis.Analytic.Basic.1023_0.jQw1fRSE1vGpOll
|
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0
|
Mathlib_Analysis_Analytic_Basic
|
case h
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π π E
x : π
h : HasFPowerSeriesAt 0 p x
n : β
β’ p n = OfNat.ofNat 0 n
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
|
ext x
|
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
|
Mathlib.Analysis.Analytic.Basic.1023_0.jQw1fRSE1vGpOll
|
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0
|
Mathlib_Analysis_Analytic_Basic
|
case h.H
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π π E
xβ : π
h : HasFPowerSeriesAt 0 p xβ
n : β
x : Fin n β π
β’ (p n) x = (OfNat.ofNat 0 n) x
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
|
rw [β mkPiField_apply_one_eq_self (p n)]
|
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
|
Mathlib.Analysis.Analytic.Basic.1023_0.jQw1fRSE1vGpOll
|
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0
|
Mathlib_Analysis_Analytic_Basic
|
case h.H
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π π E
xβ : π
h : HasFPowerSeriesAt 0 p xβ
n : β
x : Fin n β π
β’ (ContinuousMultilinearMap.mkPiField π (Fin n) ((p n) fun x => 1)) x = (OfNat.ofNat 0 n) x
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
|
have := Or.intro_right ?_ (h.apply_eq_zero n 1)
|
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
|
Mathlib.Analysis.Analytic.Basic.1023_0.jQw1fRSE1vGpOll
|
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0
|
Mathlib_Analysis_Analytic_Basic
|
case h.H.refine_2
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π π E
xβ : π
h : HasFPowerSeriesAt 0 p xβ
n : β
x : Fin n β π
this : ?h.H.refine_1 β¨ ((p n) fun x => 1) = 0
β’ (ContinuousMultilinearMap.mkPiField π (Fin n) ((p n) fun x => 1)) x = (OfNat.ofNat 0 n) x
case h.H.refine_1
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π π E
xβ : π
h : HasFPowerSeriesAt 0 p xβ
n : β
x : Fin n β π
β’ Prop
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
have := Or.intro_right ?_ (h.apply_eq_zero n 1)
|
simpa using this
|
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
have := Or.intro_right ?_ (h.apply_eq_zero n 1)
|
Mathlib.Analysis.Analytic.Basic.1023_0.jQw1fRSE1vGpOll
|
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
pβ pβ : FormalMultilinearSeries π π E
f : π β E
x : π
hβ : HasFPowerSeriesAt f pβ x
hβ : HasFPowerSeriesAt f pβ x
β’ HasFPowerSeriesAt 0 (pβ - pβ) (?m.1184276 hβ hβ)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
have := Or.intro_right ?_ (h.apply_eq_zero n 1)
simpa using this
#align has_fpower_series_at.eq_zero HasFPowerSeriesAt.eq_zero
/-- One-dimensional formal multilinear series representing the same function are equal. -/
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries {pβ pβ : FormalMultilinearSeries π π E}
{f : π β E} {x : π} (hβ : HasFPowerSeriesAt f pβ x) (hβ : HasFPowerSeriesAt f pβ x) : pβ = pβ :=
sub_eq_zero.mp (HasFPowerSeriesAt.eq_zero (by
|
simpa only [sub_self] using hβ.sub hβ
|
/-- One-dimensional formal multilinear series representing the same function are equal. -/
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries {pβ pβ : FormalMultilinearSeries π π E}
{f : π β E} {x : π} (hβ : HasFPowerSeriesAt f pβ x) (hβ : HasFPowerSeriesAt f pβ x) : pβ = pβ :=
sub_eq_zero.mp (HasFPowerSeriesAt.eq_zero (by
|
Mathlib.Analysis.Analytic.Basic.1035_0.jQw1fRSE1vGpOll
|
/-- One-dimensional formal multilinear series representing the same function are equal. -/
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries {pβ pβ : FormalMultilinearSeries π π E}
{f : π β E} {x : π} (hβ : HasFPowerSeriesAt f pβ x) (hβ : HasFPowerSeriesAt f pβ x) : pβ = pβ
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x y : E
r R : ββ₯0
k l : β
s : Finset (Fin (k + l))
hs : Finset.card s = l
β’ ContinuousMultilinearMap π (fun i => E) (ContinuousMultilinearMap π (fun i => E) F)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
have := Or.intro_right ?_ (h.apply_eq_zero n 1)
simpa using this
#align has_fpower_series_at.eq_zero HasFPowerSeriesAt.eq_zero
/-- One-dimensional formal multilinear series representing the same function are equal. -/
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries {pβ pβ : FormalMultilinearSeries π π E}
{f : π β E} {x : π} (hβ : HasFPowerSeriesAt f pβ x) (hβ : HasFPowerSeriesAt f pβ x) : pβ = pβ :=
sub_eq_zero.mp (HasFPowerSeriesAt.eq_zero (by simpa only [sub_self] using hβ.sub hβ))
#align has_fpower_series_at.eq_formal_multilinear_series HasFPowerSeriesAt.eq_formalMultilinearSeries
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
{p q : FormalMultilinearSeries π π E} {f g : π β E} {x : π} (hp : HasFPowerSeriesAt f p x)
(hq : HasFPowerSeriesAt g q x) (heq : βαΆ z in π x, f z = g z) : p = q :=
(hp.congr heq).eq_formalMultilinearSeries hq
#align has_fpower_series_at.eq_formal_multilinear_series_of_eventually HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
/-- A one-dimensional formal multilinear series representing a locally zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero_of_eventually {p : FormalMultilinearSeries π π E} {f : π β E}
{x : π} (hp : HasFPowerSeriesAt f p x) (hf : f =αΆ [π x] 0) : p = 0 :=
(hp.congr hf).eq_zero
#align has_fpower_series_at.eq_zero_of_eventually HasFPowerSeriesAt.eq_zero_of_eventually
/-- If a function `f : π β E` has two power series representations at `x`, then the given radii in
which convergence is guaranteed may be interchanged. This can be useful when the formal multilinear
series in one representation has a particularly nice form, but the other has a larger radius. -/
theorem HasFPowerSeriesOnBall.exchange_radius {pβ pβ : FormalMultilinearSeries π π E} {f : π β E}
{rβ rβ : ββ₯0β} {x : π} (hβ : HasFPowerSeriesOnBall f pβ x rβ)
(hβ : HasFPowerSeriesOnBall f pβ x rβ) : HasFPowerSeriesOnBall f pβ x rβ :=
hβ.hasFPowerSeriesAt.eq_formalMultilinearSeries hβ.hasFPowerSeriesAt βΈ hβ
#align has_fpower_series_on_ball.exchange_radius HasFPowerSeriesOnBall.exchange_radius
/-- If a function `f : π β E` has power series representation `p` on a ball of some radius and for
each positive radius it has some power series representation, then `p` converges to `f` on the whole
`π`. -/
theorem HasFPowerSeriesOnBall.r_eq_top_of_exists {f : π β E} {r : ββ₯0β} {x : π}
{p : FormalMultilinearSeries π π E} (h : HasFPowerSeriesOnBall f p x r)
(h' : β (r' : ββ₯0) (_ : 0 < r'), β p' : FormalMultilinearSeries π π E,
HasFPowerSeriesOnBall f p' x r') :
HasFPowerSeriesOnBall f p x β :=
{ r_le := ENNReal.le_of_forall_pos_nnreal_lt fun r hr _ =>
let β¨_, hp'β© := h' r hr
(h.exchange_radius hp').r_le
r_pos := ENNReal.coe_lt_top
hasSum := fun {y} _ =>
let β¨r', hr'β© := exists_gt βyββ
let β¨_, hp'β© := h' r' hr'.ne_bot.bot_lt
(h.exchange_radius hp').hasSum <| mem_emetric_ball_zero_iff.mpr (ENNReal.coe_lt_coe.2 hr') }
#align has_fpower_series_on_ball.r_eq_top_of_exists HasFPowerSeriesOnBall.r_eq_top_of_exists
end Uniqueness
/-!
### Changing origin in a power series
If a function is analytic in a disk `D(x, R)`, then it is analytic in any disk contained in that
one. Indeed, one can write
$$
f (x + y + z) = \sum_{n} p_n (y + z)^n = \sum_{n, k} \binom{n}{k} p_n y^{n-k} z^k
= \sum_{k} \Bigl(\sum_{n} \binom{n}{k} p_n y^{n-k}\Bigr) z^k.
$$
The corresponding power series has thus a `k`-th coefficient equal to
$\sum_{n} \binom{n}{k} p_n y^{n-k}$. In the general case where `pβ` is a multilinear map, this has
to be interpreted suitably: instead of having a binomial coefficient, one should sum over all
possible subsets `s` of `Fin n` of cardinal `k`, and attribute `z` to the indices in `s` and
`y` to the indices outside of `s`.
In this paragraph, we implement this. The new power series is called `p.changeOrigin y`. Then, we
check its convergence and the fact that its sum coincides with the original sum. The outcome of this
discussion is that the set of points where a function is analytic is open.
-/
namespace FormalMultilinearSeries
section
variable (p : FormalMultilinearSeries π E F) {x y : E} {r R : ββ₯0}
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F := by
|
let a := ContinuousMultilinearMap.curryFinFinset π E F hs
(by erw [Finset.card_compl, Fintype.card_fin, hs, add_tsub_cancel_right])
|
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F := by
|
Mathlib.Analysis.Analytic.Basic.1109_0.jQw1fRSE1vGpOll
|
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x y : E
r R : ββ₯0
k l : β
s : Finset (Fin (k + l))
hs : Finset.card s = l
β’ Finset.card sαΆ = ?m.1215608
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
have := Or.intro_right ?_ (h.apply_eq_zero n 1)
simpa using this
#align has_fpower_series_at.eq_zero HasFPowerSeriesAt.eq_zero
/-- One-dimensional formal multilinear series representing the same function are equal. -/
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries {pβ pβ : FormalMultilinearSeries π π E}
{f : π β E} {x : π} (hβ : HasFPowerSeriesAt f pβ x) (hβ : HasFPowerSeriesAt f pβ x) : pβ = pβ :=
sub_eq_zero.mp (HasFPowerSeriesAt.eq_zero (by simpa only [sub_self] using hβ.sub hβ))
#align has_fpower_series_at.eq_formal_multilinear_series HasFPowerSeriesAt.eq_formalMultilinearSeries
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
{p q : FormalMultilinearSeries π π E} {f g : π β E} {x : π} (hp : HasFPowerSeriesAt f p x)
(hq : HasFPowerSeriesAt g q x) (heq : βαΆ z in π x, f z = g z) : p = q :=
(hp.congr heq).eq_formalMultilinearSeries hq
#align has_fpower_series_at.eq_formal_multilinear_series_of_eventually HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
/-- A one-dimensional formal multilinear series representing a locally zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero_of_eventually {p : FormalMultilinearSeries π π E} {f : π β E}
{x : π} (hp : HasFPowerSeriesAt f p x) (hf : f =αΆ [π x] 0) : p = 0 :=
(hp.congr hf).eq_zero
#align has_fpower_series_at.eq_zero_of_eventually HasFPowerSeriesAt.eq_zero_of_eventually
/-- If a function `f : π β E` has two power series representations at `x`, then the given radii in
which convergence is guaranteed may be interchanged. This can be useful when the formal multilinear
series in one representation has a particularly nice form, but the other has a larger radius. -/
theorem HasFPowerSeriesOnBall.exchange_radius {pβ pβ : FormalMultilinearSeries π π E} {f : π β E}
{rβ rβ : ββ₯0β} {x : π} (hβ : HasFPowerSeriesOnBall f pβ x rβ)
(hβ : HasFPowerSeriesOnBall f pβ x rβ) : HasFPowerSeriesOnBall f pβ x rβ :=
hβ.hasFPowerSeriesAt.eq_formalMultilinearSeries hβ.hasFPowerSeriesAt βΈ hβ
#align has_fpower_series_on_ball.exchange_radius HasFPowerSeriesOnBall.exchange_radius
/-- If a function `f : π β E` has power series representation `p` on a ball of some radius and for
each positive radius it has some power series representation, then `p` converges to `f` on the whole
`π`. -/
theorem HasFPowerSeriesOnBall.r_eq_top_of_exists {f : π β E} {r : ββ₯0β} {x : π}
{p : FormalMultilinearSeries π π E} (h : HasFPowerSeriesOnBall f p x r)
(h' : β (r' : ββ₯0) (_ : 0 < r'), β p' : FormalMultilinearSeries π π E,
HasFPowerSeriesOnBall f p' x r') :
HasFPowerSeriesOnBall f p x β :=
{ r_le := ENNReal.le_of_forall_pos_nnreal_lt fun r hr _ =>
let β¨_, hp'β© := h' r hr
(h.exchange_radius hp').r_le
r_pos := ENNReal.coe_lt_top
hasSum := fun {y} _ =>
let β¨r', hr'β© := exists_gt βyββ
let β¨_, hp'β© := h' r' hr'.ne_bot.bot_lt
(h.exchange_radius hp').hasSum <| mem_emetric_ball_zero_iff.mpr (ENNReal.coe_lt_coe.2 hr') }
#align has_fpower_series_on_ball.r_eq_top_of_exists HasFPowerSeriesOnBall.r_eq_top_of_exists
end Uniqueness
/-!
### Changing origin in a power series
If a function is analytic in a disk `D(x, R)`, then it is analytic in any disk contained in that
one. Indeed, one can write
$$
f (x + y + z) = \sum_{n} p_n (y + z)^n = \sum_{n, k} \binom{n}{k} p_n y^{n-k} z^k
= \sum_{k} \Bigl(\sum_{n} \binom{n}{k} p_n y^{n-k}\Bigr) z^k.
$$
The corresponding power series has thus a `k`-th coefficient equal to
$\sum_{n} \binom{n}{k} p_n y^{n-k}$. In the general case where `pβ` is a multilinear map, this has
to be interpreted suitably: instead of having a binomial coefficient, one should sum over all
possible subsets `s` of `Fin n` of cardinal `k`, and attribute `z` to the indices in `s` and
`y` to the indices outside of `s`.
In this paragraph, we implement this. The new power series is called `p.changeOrigin y`. Then, we
check its convergence and the fact that its sum coincides with the original sum. The outcome of this
discussion is that the set of points where a function is analytic is open.
-/
namespace FormalMultilinearSeries
section
variable (p : FormalMultilinearSeries π E F) {x y : E} {r R : ββ₯0}
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F := by
let a := ContinuousMultilinearMap.curryFinFinset π E F hs
(by
|
erw [Finset.card_compl, Fintype.card_fin, hs, add_tsub_cancel_right]
|
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F := by
let a := ContinuousMultilinearMap.curryFinFinset π E F hs
(by
|
Mathlib.Analysis.Analytic.Basic.1109_0.jQw1fRSE1vGpOll
|
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x y : E
r R : ββ₯0
k l : β
s : Finset (Fin (k + l))
hs : Finset.card s = l
a : ContinuousMultilinearMap π (fun i => E) F ββα΅’[π]
ContinuousMultilinearMap π (fun i => E) (ContinuousMultilinearMap π (fun i => E) F) :=
ContinuousMultilinearMap.curryFinFinset π E F hs (_ : Finset.card sαΆ = k)
β’ ContinuousMultilinearMap π (fun i => E) (ContinuousMultilinearMap π (fun i => E) F)
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
have := Or.intro_right ?_ (h.apply_eq_zero n 1)
simpa using this
#align has_fpower_series_at.eq_zero HasFPowerSeriesAt.eq_zero
/-- One-dimensional formal multilinear series representing the same function are equal. -/
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries {pβ pβ : FormalMultilinearSeries π π E}
{f : π β E} {x : π} (hβ : HasFPowerSeriesAt f pβ x) (hβ : HasFPowerSeriesAt f pβ x) : pβ = pβ :=
sub_eq_zero.mp (HasFPowerSeriesAt.eq_zero (by simpa only [sub_self] using hβ.sub hβ))
#align has_fpower_series_at.eq_formal_multilinear_series HasFPowerSeriesAt.eq_formalMultilinearSeries
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
{p q : FormalMultilinearSeries π π E} {f g : π β E} {x : π} (hp : HasFPowerSeriesAt f p x)
(hq : HasFPowerSeriesAt g q x) (heq : βαΆ z in π x, f z = g z) : p = q :=
(hp.congr heq).eq_formalMultilinearSeries hq
#align has_fpower_series_at.eq_formal_multilinear_series_of_eventually HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
/-- A one-dimensional formal multilinear series representing a locally zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero_of_eventually {p : FormalMultilinearSeries π π E} {f : π β E}
{x : π} (hp : HasFPowerSeriesAt f p x) (hf : f =αΆ [π x] 0) : p = 0 :=
(hp.congr hf).eq_zero
#align has_fpower_series_at.eq_zero_of_eventually HasFPowerSeriesAt.eq_zero_of_eventually
/-- If a function `f : π β E` has two power series representations at `x`, then the given radii in
which convergence is guaranteed may be interchanged. This can be useful when the formal multilinear
series in one representation has a particularly nice form, but the other has a larger radius. -/
theorem HasFPowerSeriesOnBall.exchange_radius {pβ pβ : FormalMultilinearSeries π π E} {f : π β E}
{rβ rβ : ββ₯0β} {x : π} (hβ : HasFPowerSeriesOnBall f pβ x rβ)
(hβ : HasFPowerSeriesOnBall f pβ x rβ) : HasFPowerSeriesOnBall f pβ x rβ :=
hβ.hasFPowerSeriesAt.eq_formalMultilinearSeries hβ.hasFPowerSeriesAt βΈ hβ
#align has_fpower_series_on_ball.exchange_radius HasFPowerSeriesOnBall.exchange_radius
/-- If a function `f : π β E` has power series representation `p` on a ball of some radius and for
each positive radius it has some power series representation, then `p` converges to `f` on the whole
`π`. -/
theorem HasFPowerSeriesOnBall.r_eq_top_of_exists {f : π β E} {r : ββ₯0β} {x : π}
{p : FormalMultilinearSeries π π E} (h : HasFPowerSeriesOnBall f p x r)
(h' : β (r' : ββ₯0) (_ : 0 < r'), β p' : FormalMultilinearSeries π π E,
HasFPowerSeriesOnBall f p' x r') :
HasFPowerSeriesOnBall f p x β :=
{ r_le := ENNReal.le_of_forall_pos_nnreal_lt fun r hr _ =>
let β¨_, hp'β© := h' r hr
(h.exchange_radius hp').r_le
r_pos := ENNReal.coe_lt_top
hasSum := fun {y} _ =>
let β¨r', hr'β© := exists_gt βyββ
let β¨_, hp'β© := h' r' hr'.ne_bot.bot_lt
(h.exchange_radius hp').hasSum <| mem_emetric_ball_zero_iff.mpr (ENNReal.coe_lt_coe.2 hr') }
#align has_fpower_series_on_ball.r_eq_top_of_exists HasFPowerSeriesOnBall.r_eq_top_of_exists
end Uniqueness
/-!
### Changing origin in a power series
If a function is analytic in a disk `D(x, R)`, then it is analytic in any disk contained in that
one. Indeed, one can write
$$
f (x + y + z) = \sum_{n} p_n (y + z)^n = \sum_{n, k} \binom{n}{k} p_n y^{n-k} z^k
= \sum_{k} \Bigl(\sum_{n} \binom{n}{k} p_n y^{n-k}\Bigr) z^k.
$$
The corresponding power series has thus a `k`-th coefficient equal to
$\sum_{n} \binom{n}{k} p_n y^{n-k}$. In the general case where `pβ` is a multilinear map, this has
to be interpreted suitably: instead of having a binomial coefficient, one should sum over all
possible subsets `s` of `Fin n` of cardinal `k`, and attribute `z` to the indices in `s` and
`y` to the indices outside of `s`.
In this paragraph, we implement this. The new power series is called `p.changeOrigin y`. Then, we
check its convergence and the fact that its sum coincides with the original sum. The outcome of this
discussion is that the set of points where a function is analytic is open.
-/
namespace FormalMultilinearSeries
section
variable (p : FormalMultilinearSeries π E F) {x y : E} {r R : ββ₯0}
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F := by
let a := ContinuousMultilinearMap.curryFinFinset π E F hs
(by erw [Finset.card_compl, Fintype.card_fin, hs, add_tsub_cancel_right])
|
exact a (p (k + l))
|
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F := by
let a := ContinuousMultilinearMap.curryFinFinset π E F hs
(by erw [Finset.card_compl, Fintype.card_fin, hs, add_tsub_cancel_right])
|
Mathlib.Analysis.Analytic.Basic.1109_0.jQw1fRSE1vGpOll
|
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x y : E
r R : ββ₯0
k l : β
s : Finset (Fin (k + l))
hs : Finset.card s = l
β’ βchangeOriginSeriesTerm p k l s hsβ = βp (k + l)β
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
have := Or.intro_right ?_ (h.apply_eq_zero n 1)
simpa using this
#align has_fpower_series_at.eq_zero HasFPowerSeriesAt.eq_zero
/-- One-dimensional formal multilinear series representing the same function are equal. -/
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries {pβ pβ : FormalMultilinearSeries π π E}
{f : π β E} {x : π} (hβ : HasFPowerSeriesAt f pβ x) (hβ : HasFPowerSeriesAt f pβ x) : pβ = pβ :=
sub_eq_zero.mp (HasFPowerSeriesAt.eq_zero (by simpa only [sub_self] using hβ.sub hβ))
#align has_fpower_series_at.eq_formal_multilinear_series HasFPowerSeriesAt.eq_formalMultilinearSeries
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
{p q : FormalMultilinearSeries π π E} {f g : π β E} {x : π} (hp : HasFPowerSeriesAt f p x)
(hq : HasFPowerSeriesAt g q x) (heq : βαΆ z in π x, f z = g z) : p = q :=
(hp.congr heq).eq_formalMultilinearSeries hq
#align has_fpower_series_at.eq_formal_multilinear_series_of_eventually HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
/-- A one-dimensional formal multilinear series representing a locally zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero_of_eventually {p : FormalMultilinearSeries π π E} {f : π β E}
{x : π} (hp : HasFPowerSeriesAt f p x) (hf : f =αΆ [π x] 0) : p = 0 :=
(hp.congr hf).eq_zero
#align has_fpower_series_at.eq_zero_of_eventually HasFPowerSeriesAt.eq_zero_of_eventually
/-- If a function `f : π β E` has two power series representations at `x`, then the given radii in
which convergence is guaranteed may be interchanged. This can be useful when the formal multilinear
series in one representation has a particularly nice form, but the other has a larger radius. -/
theorem HasFPowerSeriesOnBall.exchange_radius {pβ pβ : FormalMultilinearSeries π π E} {f : π β E}
{rβ rβ : ββ₯0β} {x : π} (hβ : HasFPowerSeriesOnBall f pβ x rβ)
(hβ : HasFPowerSeriesOnBall f pβ x rβ) : HasFPowerSeriesOnBall f pβ x rβ :=
hβ.hasFPowerSeriesAt.eq_formalMultilinearSeries hβ.hasFPowerSeriesAt βΈ hβ
#align has_fpower_series_on_ball.exchange_radius HasFPowerSeriesOnBall.exchange_radius
/-- If a function `f : π β E` has power series representation `p` on a ball of some radius and for
each positive radius it has some power series representation, then `p` converges to `f` on the whole
`π`. -/
theorem HasFPowerSeriesOnBall.r_eq_top_of_exists {f : π β E} {r : ββ₯0β} {x : π}
{p : FormalMultilinearSeries π π E} (h : HasFPowerSeriesOnBall f p x r)
(h' : β (r' : ββ₯0) (_ : 0 < r'), β p' : FormalMultilinearSeries π π E,
HasFPowerSeriesOnBall f p' x r') :
HasFPowerSeriesOnBall f p x β :=
{ r_le := ENNReal.le_of_forall_pos_nnreal_lt fun r hr _ =>
let β¨_, hp'β© := h' r hr
(h.exchange_radius hp').r_le
r_pos := ENNReal.coe_lt_top
hasSum := fun {y} _ =>
let β¨r', hr'β© := exists_gt βyββ
let β¨_, hp'β© := h' r' hr'.ne_bot.bot_lt
(h.exchange_radius hp').hasSum <| mem_emetric_ball_zero_iff.mpr (ENNReal.coe_lt_coe.2 hr') }
#align has_fpower_series_on_ball.r_eq_top_of_exists HasFPowerSeriesOnBall.r_eq_top_of_exists
end Uniqueness
/-!
### Changing origin in a power series
If a function is analytic in a disk `D(x, R)`, then it is analytic in any disk contained in that
one. Indeed, one can write
$$
f (x + y + z) = \sum_{n} p_n (y + z)^n = \sum_{n, k} \binom{n}{k} p_n y^{n-k} z^k
= \sum_{k} \Bigl(\sum_{n} \binom{n}{k} p_n y^{n-k}\Bigr) z^k.
$$
The corresponding power series has thus a `k`-th coefficient equal to
$\sum_{n} \binom{n}{k} p_n y^{n-k}$. In the general case where `pβ` is a multilinear map, this has
to be interpreted suitably: instead of having a binomial coefficient, one should sum over all
possible subsets `s` of `Fin n` of cardinal `k`, and attribute `z` to the indices in `s` and
`y` to the indices outside of `s`.
In this paragraph, we implement this. The new power series is called `p.changeOrigin y`. Then, we
check its convergence and the fact that its sum coincides with the original sum. The outcome of this
discussion is that the set of points where a function is analytic is open.
-/
namespace FormalMultilinearSeries
section
variable (p : FormalMultilinearSeries π E F) {x y : E} {r R : ββ₯0}
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F := by
let a := ContinuousMultilinearMap.curryFinFinset π E F hs
(by erw [Finset.card_compl, Fintype.card_fin, hs, add_tsub_cancel_right])
exact a (p (k + l))
#align formal_multilinear_series.change_origin_series_term FormalMultilinearSeries.changeOriginSeriesTerm
theorem changeOriginSeriesTerm_apply (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l)
(x y : E) :
(p.changeOriginSeriesTerm k l s hs (fun _ => x) fun _ => y) =
p (k + l) (s.piecewise (fun _ => x) fun _ => y) :=
ContinuousMultilinearMap.curryFinFinset_apply_const _ _ _ _ _
#align formal_multilinear_series.change_origin_series_term_apply FormalMultilinearSeries.changeOriginSeriesTerm_apply
@[simp]
theorem norm_changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
βp.changeOriginSeriesTerm k l s hsβ = βp (k + l)β := by
|
simp only [changeOriginSeriesTerm, LinearIsometryEquiv.norm_map]
|
@[simp]
theorem norm_changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
βp.changeOriginSeriesTerm k l s hsβ = βp (k + l)β := by
|
Mathlib.Analysis.Analytic.Basic.1133_0.jQw1fRSE1vGpOll
|
@[simp]
theorem norm_changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
βp.changeOriginSeriesTerm k l s hsβ = βp (k + l)β
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
x y : E
r R : ββ₯0
k l : β
s : Finset (Fin (k + l))
hs : Finset.card s = l
β’ βchangeOriginSeriesTerm p k l s hsββ = βp (k + l)ββ
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
have := Or.intro_right ?_ (h.apply_eq_zero n 1)
simpa using this
#align has_fpower_series_at.eq_zero HasFPowerSeriesAt.eq_zero
/-- One-dimensional formal multilinear series representing the same function are equal. -/
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries {pβ pβ : FormalMultilinearSeries π π E}
{f : π β E} {x : π} (hβ : HasFPowerSeriesAt f pβ x) (hβ : HasFPowerSeriesAt f pβ x) : pβ = pβ :=
sub_eq_zero.mp (HasFPowerSeriesAt.eq_zero (by simpa only [sub_self] using hβ.sub hβ))
#align has_fpower_series_at.eq_formal_multilinear_series HasFPowerSeriesAt.eq_formalMultilinearSeries
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
{p q : FormalMultilinearSeries π π E} {f g : π β E} {x : π} (hp : HasFPowerSeriesAt f p x)
(hq : HasFPowerSeriesAt g q x) (heq : βαΆ z in π x, f z = g z) : p = q :=
(hp.congr heq).eq_formalMultilinearSeries hq
#align has_fpower_series_at.eq_formal_multilinear_series_of_eventually HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
/-- A one-dimensional formal multilinear series representing a locally zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero_of_eventually {p : FormalMultilinearSeries π π E} {f : π β E}
{x : π} (hp : HasFPowerSeriesAt f p x) (hf : f =αΆ [π x] 0) : p = 0 :=
(hp.congr hf).eq_zero
#align has_fpower_series_at.eq_zero_of_eventually HasFPowerSeriesAt.eq_zero_of_eventually
/-- If a function `f : π β E` has two power series representations at `x`, then the given radii in
which convergence is guaranteed may be interchanged. This can be useful when the formal multilinear
series in one representation has a particularly nice form, but the other has a larger radius. -/
theorem HasFPowerSeriesOnBall.exchange_radius {pβ pβ : FormalMultilinearSeries π π E} {f : π β E}
{rβ rβ : ββ₯0β} {x : π} (hβ : HasFPowerSeriesOnBall f pβ x rβ)
(hβ : HasFPowerSeriesOnBall f pβ x rβ) : HasFPowerSeriesOnBall f pβ x rβ :=
hβ.hasFPowerSeriesAt.eq_formalMultilinearSeries hβ.hasFPowerSeriesAt βΈ hβ
#align has_fpower_series_on_ball.exchange_radius HasFPowerSeriesOnBall.exchange_radius
/-- If a function `f : π β E` has power series representation `p` on a ball of some radius and for
each positive radius it has some power series representation, then `p` converges to `f` on the whole
`π`. -/
theorem HasFPowerSeriesOnBall.r_eq_top_of_exists {f : π β E} {r : ββ₯0β} {x : π}
{p : FormalMultilinearSeries π π E} (h : HasFPowerSeriesOnBall f p x r)
(h' : β (r' : ββ₯0) (_ : 0 < r'), β p' : FormalMultilinearSeries π π E,
HasFPowerSeriesOnBall f p' x r') :
HasFPowerSeriesOnBall f p x β :=
{ r_le := ENNReal.le_of_forall_pos_nnreal_lt fun r hr _ =>
let β¨_, hp'β© := h' r hr
(h.exchange_radius hp').r_le
r_pos := ENNReal.coe_lt_top
hasSum := fun {y} _ =>
let β¨r', hr'β© := exists_gt βyββ
let β¨_, hp'β© := h' r' hr'.ne_bot.bot_lt
(h.exchange_radius hp').hasSum <| mem_emetric_ball_zero_iff.mpr (ENNReal.coe_lt_coe.2 hr') }
#align has_fpower_series_on_ball.r_eq_top_of_exists HasFPowerSeriesOnBall.r_eq_top_of_exists
end Uniqueness
/-!
### Changing origin in a power series
If a function is analytic in a disk `D(x, R)`, then it is analytic in any disk contained in that
one. Indeed, one can write
$$
f (x + y + z) = \sum_{n} p_n (y + z)^n = \sum_{n, k} \binom{n}{k} p_n y^{n-k} z^k
= \sum_{k} \Bigl(\sum_{n} \binom{n}{k} p_n y^{n-k}\Bigr) z^k.
$$
The corresponding power series has thus a `k`-th coefficient equal to
$\sum_{n} \binom{n}{k} p_n y^{n-k}$. In the general case where `pβ` is a multilinear map, this has
to be interpreted suitably: instead of having a binomial coefficient, one should sum over all
possible subsets `s` of `Fin n` of cardinal `k`, and attribute `z` to the indices in `s` and
`y` to the indices outside of `s`.
In this paragraph, we implement this. The new power series is called `p.changeOrigin y`. Then, we
check its convergence and the fact that its sum coincides with the original sum. The outcome of this
discussion is that the set of points where a function is analytic is open.
-/
namespace FormalMultilinearSeries
section
variable (p : FormalMultilinearSeries π E F) {x y : E} {r R : ββ₯0}
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F := by
let a := ContinuousMultilinearMap.curryFinFinset π E F hs
(by erw [Finset.card_compl, Fintype.card_fin, hs, add_tsub_cancel_right])
exact a (p (k + l))
#align formal_multilinear_series.change_origin_series_term FormalMultilinearSeries.changeOriginSeriesTerm
theorem changeOriginSeriesTerm_apply (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l)
(x y : E) :
(p.changeOriginSeriesTerm k l s hs (fun _ => x) fun _ => y) =
p (k + l) (s.piecewise (fun _ => x) fun _ => y) :=
ContinuousMultilinearMap.curryFinFinset_apply_const _ _ _ _ _
#align formal_multilinear_series.change_origin_series_term_apply FormalMultilinearSeries.changeOriginSeriesTerm_apply
@[simp]
theorem norm_changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
βp.changeOriginSeriesTerm k l s hsβ = βp (k + l)β := by
simp only [changeOriginSeriesTerm, LinearIsometryEquiv.norm_map]
#align formal_multilinear_series.norm_change_origin_series_term FormalMultilinearSeries.norm_changeOriginSeriesTerm
@[simp]
theorem nnnorm_changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
βp.changeOriginSeriesTerm k l s hsββ = βp (k + l)ββ := by
|
simp only [changeOriginSeriesTerm, LinearIsometryEquiv.nnnorm_map]
|
@[simp]
theorem nnnorm_changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
βp.changeOriginSeriesTerm k l s hsββ = βp (k + l)ββ := by
|
Mathlib.Analysis.Analytic.Basic.1139_0.jQw1fRSE1vGpOll
|
@[simp]
theorem nnnorm_changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
βp.changeOriginSeriesTerm k l s hsββ = βp (k + l)ββ
|
Mathlib_Analysis_Analytic_Basic
|
π : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
instββΆ : NontriviallyNormedField π
instββ΅ : NormedAddCommGroup E
instββ΄ : NormedSpace π E
instβΒ³ : NormedAddCommGroup F
instβΒ² : NormedSpace π F
instβΒΉ : NormedAddCommGroup G
instβ : NormedSpace π G
p : FormalMultilinearSeries π E F
xβ yβ : E
r R : ββ₯0
k l : β
s : Finset (Fin (k + l))
hs : Finset.card s = l
x y : E
β’ β((changeOriginSeriesTerm p k l s hs) fun x_1 => x) fun x => yββ β€ βp (k + l)ββ * βxββ ^ l * βyββ ^ k
|
/-
Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: SΓ©bastien GouΓ«zel, Yury Kudryashov
-/
import Mathlib.Analysis.Calculus.FormalMultilinearSeries
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.Logic.Equiv.Fin
import Mathlib.Topology.Algebra.InfiniteSum.Module
#align_import analysis.analytic.basic from "leanprover-community/mathlib"@"32253a1a1071173b33dc7d6a218cf722c6feb514"
/-!
# Analytic functions
A function is analytic in one dimension around `0` if it can be written as a converging power series
`Ξ£ pβ zβΏ`. This definition can be extended to any dimension (even in infinite dimension) by
requiring that `pβ` is a continuous `n`-multilinear map. In general, `pβ` is not unique (in two
dimensions, taking `pβ (x, y) (x', y') = x y'` or `y x'` gives the same map when applied to a
vector `(x, y) (x, y)`). A way to guarantee uniqueness is to take a symmetric `pβ`, but this is not
always possible in nonzero characteristic (in characteristic 2, the previous example has no
symmetric representative). Therefore, we do not insist on symmetry or uniqueness in the definition,
and we only require the existence of a converging series.
The general framework is important to say that the exponential map on bounded operators on a Banach
space is analytic, as well as the inverse on invertible operators.
## 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 : β`.
* `p.radius`: the largest `r : ββ₯0β` such that `βp nβ * r^n` grows subexponentially.
* `p.le_radius_of_bound`, `p.le_radius_of_bound_nnreal`, `p.le_radius_of_isBigO`: if `βp nβ * r ^ n`
is bounded above, then `r β€ p.radius`;
* `p.isLittleO_of_lt_radius`, `p.norm_mul_pow_le_mul_pow_of_lt_radius`,
`p.isLittleO_one_of_lt_radius`,
`p.norm_mul_pow_le_of_lt_radius`, `p.nnnorm_mul_pow_le_of_lt_radius`: if `r < p.radius`, then
`βp nβ * r ^ n` tends to zero exponentially;
* `p.lt_radius_of_isBigO`: if `r β 0` and `βp nβ * r ^ n = O(a ^ n)` for some `-1 < a < 1`, then
`r < p.radius`;
* `p.partialSum n x`: the sum `β_{i = 0}^{n-1} pα΅’ xβ±`.
* `p.sum x`: the sum `β'_{i = 0}^{β} pα΅’ xβ±`.
Additionally, let `f` be a function from `E` to `F`.
* `HasFPowerSeriesOnBall f p x r`: on the ball of center `x` with radius `r`,
`f (x + y) = β'_n pβ yβΏ`.
* `HasFPowerSeriesAt f p x`: on some ball of center `x` with positive radius, holds
`HasFPowerSeriesOnBall f p x r`.
* `AnalyticAt π f x`: there exists a power series `p` such that holds `HasFPowerSeriesAt f p x`.
* `AnalyticOn π f s`: the function `f` is analytic at every point of `s`.
We develop the basic properties of these notions, notably:
* If a function admits a power series, it is continuous (see
`HasFPowerSeriesOnBall.continuousOn` and `HasFPowerSeriesAt.continuousAt` and
`AnalyticAt.continuousAt`).
* In a complete space, the sum of a formal power series with positive radius is well defined on the
disk of convergence, see `FormalMultilinearSeries.hasFPowerSeriesOnBall`.
* If a function admits a power series in a ball, then it is analytic 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`. See `HasFPowerSeriesOnBall.changeOrigin`. It follows in particular that
the set of points at which a given function is analytic is open, see `isOpen_analyticAt`.
## Implementation details
We only introduce the radius of convergence of a power series, as `p.radius`.
For a power series in finitely many dimensions, there is a finer (directional, coordinate-dependent)
notion, describing the polydisk of convergence. This notion is more specific, and not necessary to
build the general theory. We do not define it here.
-/
noncomputable section
variable {π E F G : Type*}
open Topology Classical BigOperators NNReal Filter ENNReal
open Set Filter Asymptotics
namespace FormalMultilinearSeries
variable [Ring π] [AddCommGroup E] [AddCommGroup F] [Module π E] [Module π F]
variable [TopologicalSpace E] [TopologicalSpace F]
variable [TopologicalAddGroup E] [TopologicalAddGroup F]
variable [ContinuousConstSMul π E] [ContinuousConstSMul π F]
/-- Given a formal multilinear series `p` and a vector `x`, then `p.sum x` is the sum `Ξ£ pβ xβΏ`. A
priori, it only behaves well when `βxβ < p.radius`. -/
protected def sum (p : FormalMultilinearSeries π E F) (x : E) : F :=
β' n : β, p n fun _ => x
#align formal_multilinear_series.sum FormalMultilinearSeries.sum
/-- Given a formal multilinear series `p` and a vector `x`, then `p.partialSum n x` is the sum
`Ξ£ pβ xα΅` for `k β {0,..., n-1}`. -/
def partialSum (p : FormalMultilinearSeries π E F) (n : β) (x : E) : F :=
β k in Finset.range n, p k fun _ : Fin k => x
#align formal_multilinear_series.partial_sum FormalMultilinearSeries.partialSum
/-- The partial sums of a formal multilinear series are continuous. -/
theorem partialSum_continuous (p : FormalMultilinearSeries π E F) (n : β) :
Continuous (p.partialSum n) := by
unfold partialSum -- Porting note: added
continuity
#align formal_multilinear_series.partial_sum_continuous FormalMultilinearSeries.partialSum_continuous
end FormalMultilinearSeries
/-! ### The radius of a formal multilinear series -/
variable [NontriviallyNormedField π] [NormedAddCommGroup E] [NormedSpace π E] [NormedAddCommGroup F]
[NormedSpace π F] [NormedAddCommGroup G] [NormedSpace π G]
namespace FormalMultilinearSeries
variable (p : FormalMultilinearSeries π E F) {r : ββ₯0}
/-- The radius of a formal multilinear series is the largest `r` such that the sum `Ξ£ βpββ βyββΏ`
converges for all `βyβ < r`. This implies that `Ξ£ pβ yβΏ` converges for all `βyβ < r`, but these
definitions are *not* equivalent in general. -/
def radius (p : FormalMultilinearSeries π E F) : ββ₯0β :=
β¨ (r : ββ₯0) (C : β) (_ : β n, βp nβ * (r : β) ^ n β€ C), (r : ββ₯0β)
#align formal_multilinear_series.radius FormalMultilinearSeries.radius
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound (C : β) {r : ββ₯0} (h : β n : β, βp nβ * (r : β) ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
le_iSup_of_le r <| le_iSup_of_le C <| le_iSup (fun _ => (r : ββ₯0β)) h
#align formal_multilinear_series.le_radius_of_bound FormalMultilinearSeries.le_radius_of_bound
/-- If `βpββ rβΏ` is bounded in `n`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_bound_nnreal (C : ββ₯0) {r : ββ₯0} (h : β n : β, βp nββ * r ^ n β€ C) :
(r : ββ₯0β) β€ p.radius :=
p.le_radius_of_bound C fun n => mod_cast h n
#align formal_multilinear_series.le_radius_of_bound_nnreal FormalMultilinearSeries.le_radius_of_bound_nnreal
/-- If `βpββ rβΏ = O(1)`, as `n β β`, then the radius of `p` is at least `r`. -/
theorem le_radius_of_isBigO (h : (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) :
βr β€ p.radius :=
Exists.elim (isBigO_one_nat_atTop_iff.1 h) fun C hC =>
p.le_radius_of_bound C fun n => (le_abs_self _).trans (hC n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.le_radius_of_is_O FormalMultilinearSeries.le_radius_of_isBigO
theorem le_radius_of_eventually_le (C) (h : βαΆ n in atTop, βp nβ * (r : β) ^ n β€ C) :
βr β€ p.radius :=
p.le_radius_of_isBigO <| IsBigO.of_bound C <| h.mono fun n hn => by simpa
#align formal_multilinear_series.le_radius_of_eventually_le FormalMultilinearSeries.le_radius_of_eventually_le
theorem le_radius_of_summable_nnnorm (h : Summable fun n => βp nββ * r ^ n) : βr β€ p.radius :=
p.le_radius_of_bound_nnreal (β' n, βp nββ * r ^ n) fun _ => le_tsum' h _
#align formal_multilinear_series.le_radius_of_summable_nnnorm FormalMultilinearSeries.le_radius_of_summable_nnnorm
theorem le_radius_of_summable (h : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_summable_nnnorm <| by
simp only [β coe_nnnorm] at h
exact mod_cast h
#align formal_multilinear_series.le_radius_of_summable FormalMultilinearSeries.le_radius_of_summable
theorem radius_eq_top_of_forall_nnreal_isBigO
(h : β r : ββ₯0, (fun n => βp nβ * (r : β) ^ n) =O[atTop] fun _ => (1 : β)) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_isBigO (h r)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.radius_eq_top_of_forall_nnreal_is_O FormalMultilinearSeries.radius_eq_top_of_forall_nnreal_isBigO
theorem radius_eq_top_of_eventually_eq_zero (h : βαΆ n in atTop, p n = 0) : p.radius = β :=
p.radius_eq_top_of_forall_nnreal_isBigO fun r =>
(isBigO_zero _ _).congr' (h.mono fun n hn => by simp [hn]) EventuallyEq.rfl
#align formal_multilinear_series.radius_eq_top_of_eventually_eq_zero FormalMultilinearSeries.radius_eq_top_of_eventually_eq_zero
theorem radius_eq_top_of_forall_image_add_eq_zero (n : β) (hn : β m, p (m + n) = 0) :
p.radius = β :=
p.radius_eq_top_of_eventually_eq_zero <|
mem_atTop_sets.2 β¨n, fun _ hk => tsub_add_cancel_of_le hk βΈ hn _β©
#align formal_multilinear_series.radius_eq_top_of_forall_image_add_eq_zero FormalMultilinearSeries.radius_eq_top_of_forall_image_add_eq_zero
@[simp]
theorem constFormalMultilinearSeries_radius {v : F} :
(constFormalMultilinearSeries π E v).radius = β€ :=
(constFormalMultilinearSeries π E v).radius_eq_top_of_forall_image_add_eq_zero 1
(by simp [constFormalMultilinearSeries])
#align formal_multilinear_series.const_formal_multilinear_series_radius FormalMultilinearSeries.constFormalMultilinearSeries_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1`, `βp nβ rβΏ = o(aβΏ)`. -/
theorem isLittleO_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, (fun n => βp nβ * (r : β) ^ n) =o[atTop] (a ^ Β·) := by
have := (TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4
rw [this]
-- Porting note: was
-- rw [(TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 4]
simp only [radius, lt_iSup_iff] at h
rcases h with β¨t, C, hC, rtβ©
rw [ENNReal.coe_lt_coe, β NNReal.coe_lt_coe] at rt
have : 0 < (t : β) := r.coe_nonneg.trans_lt rt
rw [β div_lt_one this] at rt
refine' β¨_, rt, C, Or.inr zero_lt_one, fun n => _β©
calc
|βp nβ * (r : β) ^ n| = βp nβ * (t : β) ^ n * (r / t : β) ^ n := by
field_simp [mul_right_comm, abs_mul]
_ β€ C * (r / t : β) ^ n := by gcongr; apply hC
#align formal_multilinear_series.is_o_of_lt_radius FormalMultilinearSeries.isLittleO_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ = o(1)`. -/
theorem isLittleO_one_of_lt_radius (h : βr < p.radius) :
(fun n => βp nβ * (r : β) ^ n) =o[atTop] (fun _ => 1 : β β β) :=
let β¨_, ha, hpβ© := p.isLittleO_of_lt_radius h
hp.trans <| (isLittleO_pow_pow_of_lt_left ha.1.le ha.2).congr (fun _ => rfl) one_pow
#align formal_multilinear_series.is_o_one_of_lt_radius FormalMultilinearSeries.isLittleO_one_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` tends to zero exponentially:
for some `0 < a < 1` and `C > 0`, `βp nβ * r ^ n β€ C * a ^ n`. -/
theorem norm_mul_pow_le_mul_pow_of_lt_radius (h : βr < p.radius) :
β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r : β) ^ n β€ C * a ^ n := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 1 5).mp
(p.isLittleO_of_lt_radius h)
rcases this with β¨a, ha, C, hC, Hβ©
exact β¨a, ha, C, hC, fun n => (le_abs_self _).trans (H n)β©
#align formal_multilinear_series.norm_mul_pow_le_mul_pow_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_mul_pow_of_lt_radius
/-- If `r β 0` and `βpββ rβΏ = O(aβΏ)` for some `-1 < a < 1`, then `r < p.radius`. -/
theorem lt_radius_of_isBigO (hβ : r β 0) {a : β} (ha : a β Ioo (-1 : β) 1)
(hp : (fun n => βp nβ * (r : β) ^ n) =O[atTop] (a ^ Β·)) : βr < p.radius := by
-- Porting note: moved out of `rcases`
have := ((TFAE_exists_lt_isLittleO_pow (fun n => βp nβ * (r : β) ^ n) 1).out 2 5)
rcases this.mp β¨a, ha, hpβ© with β¨a, ha, C, hC, hpβ©
rw [β pos_iff_ne_zero, β NNReal.coe_pos] at hβ
lift a to ββ₯0 using ha.1.le
have : (r : β) < r / a := by
simpa only [div_one] using (div_lt_div_left hβ zero_lt_one ha.1).2 ha.2
norm_cast at this
rw [β ENNReal.coe_lt_coe] at this
refine' this.trans_le (p.le_radius_of_bound C fun n => _)
rw [NNReal.coe_div, div_pow, β mul_div_assoc, div_le_iff (pow_pos ha.1 n)]
exact (le_abs_self _).trans (hp n)
set_option linter.uppercaseLean3 false in
#align formal_multilinear_series.lt_radius_of_is_O FormalMultilinearSeries.lt_radius_of_isBigO
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ * (r : β) ^ n β€ C :=
let β¨_, ha, C, hC, hβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
β¨C, hC, fun n => (h n).trans <| mul_le_of_le_one_right hC.lt.le (pow_le_one _ ha.1.le ha.2.le)β©
#align formal_multilinear_series.norm_mul_pow_le_of_lt_radius FormalMultilinearSeries.norm_mul_pow_le_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem norm_le_div_pow_of_pos_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h0 : 0 < r) (h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nβ β€ C / (r : β) ^ n :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨C, hC, fun n => Iff.mpr (le_div_iff (pow_pos h0 _)) (hp n)β©
#align formal_multilinear_series.norm_le_div_pow_of_pos_of_lt_radius FormalMultilinearSeries.norm_le_div_pow_of_pos_of_lt_radius
/-- For `r` strictly smaller than the radius of `p`, then `βpββ rβΏ` is bounded. -/
theorem nnnorm_mul_pow_le_of_lt_radius (p : FormalMultilinearSeries π E F) {r : ββ₯0}
(h : (r : ββ₯0β) < p.radius) : β C > 0, β n, βp nββ * r ^ n β€ C :=
let β¨C, hC, hpβ© := p.norm_mul_pow_le_of_lt_radius h
β¨β¨C, hC.lt.leβ©, hC, mod_cast hpβ©
#align formal_multilinear_series.nnnorm_mul_pow_le_of_lt_radius FormalMultilinearSeries.nnnorm_mul_pow_le_of_lt_radius
theorem le_radius_of_tendsto (p : FormalMultilinearSeries π E F) {l : β}
(h : Tendsto (fun n => βp nβ * (r : β) ^ n) atTop (π l)) : βr β€ p.radius :=
p.le_radius_of_isBigO (h.isBigO_one _)
#align formal_multilinear_series.le_radius_of_tendsto FormalMultilinearSeries.le_radius_of_tendsto
theorem le_radius_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : Summable fun n => βp nβ * (r : β) ^ n) : βr β€ p.radius :=
p.le_radius_of_tendsto hs.tendsto_atTop_zero
#align formal_multilinear_series.le_radius_of_summable_norm FormalMultilinearSeries.le_radius_of_summable_norm
theorem not_summable_norm_of_radius_lt_nnnorm (p : FormalMultilinearSeries π E F) {x : E}
(h : p.radius < βxββ) : Β¬Summable fun n => βp nβ * βxβ ^ n :=
fun hs => not_le_of_lt h (p.le_radius_of_summable_norm hs)
#align formal_multilinear_series.not_summable_norm_of_radius_lt_nnnorm FormalMultilinearSeries.not_summable_norm_of_radius_lt_nnnorm
theorem summable_norm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nβ * (r : β) ^ n := by
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius h
exact .of_nonneg_of_le (fun n => mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg _))
hp ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _)
#align formal_multilinear_series.summable_norm_mul_pow FormalMultilinearSeries.summable_norm_mul_pow
theorem summable_norm_apply (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => βp n fun _ => xβ := by
rw [mem_emetric_ball_zero_iff] at hx
refine' .of_nonneg_of_le
(fun _ => norm_nonneg _) (fun n => ((p n).le_op_norm _).trans_eq _) (p.summable_norm_mul_pow hx)
simp
#align formal_multilinear_series.summable_norm_apply FormalMultilinearSeries.summable_norm_apply
theorem summable_nnnorm_mul_pow (p : FormalMultilinearSeries π E F) {r : ββ₯0} (h : βr < p.radius) :
Summable fun n : β => βp nββ * r ^ n := by
rw [β NNReal.summable_coe]
push_cast
exact p.summable_norm_mul_pow h
#align formal_multilinear_series.summable_nnnorm_mul_pow FormalMultilinearSeries.summable_nnnorm_mul_pow
protected theorem summable [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : Summable fun n : β => p n fun _ => x :=
(p.summable_norm_apply hx).of_norm
#align formal_multilinear_series.summable FormalMultilinearSeries.summable
theorem radius_eq_top_of_summable_norm (p : FormalMultilinearSeries π E F)
(hs : β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n) : p.radius = β :=
ENNReal.eq_top_of_forall_nnreal_le fun r => p.le_radius_of_summable_norm (hs r)
#align formal_multilinear_series.radius_eq_top_of_summable_norm FormalMultilinearSeries.radius_eq_top_of_summable_norm
theorem radius_eq_top_iff_summable_norm (p : FormalMultilinearSeries π E F) :
p.radius = β β β r : ββ₯0, Summable fun n => βp nβ * (r : β) ^ n := by
constructor
Β· intro h r
obtain β¨a, ha : a β Ioo (0 : β) 1, C, - : 0 < C, hpβ© := p.norm_mul_pow_le_mul_pow_of_lt_radius
(show (r : ββ₯0β) < p.radius from h.symm βΈ ENNReal.coe_lt_top)
refine' .of_norm_bounded
(fun n => (C : β) * a ^ n) ((summable_geometric_of_lt_1 ha.1.le ha.2).mul_left _) fun n => _
specialize hp n
rwa [Real.norm_of_nonneg (mul_nonneg (norm_nonneg _) (pow_nonneg r.coe_nonneg n))]
Β· exact p.radius_eq_top_of_summable_norm
#align formal_multilinear_series.radius_eq_top_iff_summable_norm FormalMultilinearSeries.radius_eq_top_iff_summable_norm
/-- If the radius of `p` is positive, then `βpββ` grows at most geometrically. -/
theorem le_mul_pow_of_radius_pos (p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
β (C r : _) (hC : 0 < C) (_ : 0 < r), β n, βp nβ β€ C * r ^ n := by
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 h with β¨r, r0, rltβ©
have rpos : 0 < (r : β) := by simp [ENNReal.coe_pos.1 r0]
rcases norm_le_div_pow_of_pos_of_lt_radius p rpos rlt with β¨C, Cpos, hCpβ©
refine' β¨C, rβ»ΒΉ, Cpos, by simp only [inv_pos, rpos], fun n => _β©
-- Porting note: was `convert`
rw [inv_pow, β div_eq_mul_inv]
exact hCp n
#align formal_multilinear_series.le_mul_pow_of_radius_pos FormalMultilinearSeries.le_mul_pow_of_radius_pos
/-- The radius of the sum of two formal series is at least the minimum of their two radii. -/
theorem min_radius_le_radius_add (p q : FormalMultilinearSeries π E F) :
min p.radius q.radius β€ (p + q).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
rw [lt_min_iff] at hr
have := ((p.isLittleO_one_of_lt_radius hr.1).add (q.isLittleO_one_of_lt_radius hr.2)).isBigO
refine' (p + q).le_radius_of_isBigO ((isBigO_of_le _ fun n => _).trans this)
rw [β add_mul, norm_mul, norm_mul, norm_norm]
exact mul_le_mul_of_nonneg_right ((norm_add_le _ _).trans (le_abs_self _)) (norm_nonneg _)
#align formal_multilinear_series.min_radius_le_radius_add FormalMultilinearSeries.min_radius_le_radius_add
@[simp]
theorem radius_neg (p : FormalMultilinearSeries π E F) : (-p).radius = p.radius := by
simp only [radius, neg_apply, norm_neg]
#align formal_multilinear_series.radius_neg FormalMultilinearSeries.radius_neg
protected theorem hasSum [CompleteSpace F] (p : FormalMultilinearSeries π E F) {x : E}
(hx : x β EMetric.ball (0 : E) p.radius) : HasSum (fun n : β => p n fun _ => x) (p.sum x) :=
(p.summable hx).hasSum
#align formal_multilinear_series.has_sum FormalMultilinearSeries.hasSum
theorem radius_le_radius_continuousLinearMap_comp (p : FormalMultilinearSeries π E F)
(f : F βL[π] G) : p.radius β€ (f.compFormalMultilinearSeries p).radius := by
refine' ENNReal.le_of_forall_nnreal_lt fun r hr => _
apply le_radius_of_isBigO
apply (IsBigO.trans_isLittleO _ (p.isLittleO_one_of_lt_radius hr)).isBigO
refine' IsBigO.mul (@IsBigOWith.isBigO _ _ _ _ _ βfβ _ _ _ _) (isBigO_refl _ _)
refine IsBigOWith.of_bound (eventually_of_forall fun n => ?_)
simpa only [norm_norm] using f.norm_compContinuousMultilinearMap_le (p n)
#align formal_multilinear_series.radius_le_radius_continuous_linear_map_comp FormalMultilinearSeries.radius_le_radius_continuousLinearMap_comp
end FormalMultilinearSeries
/-! ### Expanding a function as a power series -/
section
variable {f g : E β F} {p pf pg : FormalMultilinearSeries π E F} {x : E} {r r' : ββ₯0β}
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series on the ball of radius `r > 0` around `x` if `f (x + y) = β' pβ yβΏ` for all `βyβ < r`.
-/
structure HasFPowerSeriesOnBall (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) (r : ββ₯0β) :
Prop where
r_le : r β€ p.radius
r_pos : 0 < r
hasSum :
β {y}, y β EMetric.ball (0 : E) r β HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y))
#align has_fpower_series_on_ball HasFPowerSeriesOnBall
/-- Given a function `f : E β F` and a formal multilinear series `p`, we say that `f` has `p` as
a power series around `x` if `f (x + y) = β' pβ yβΏ` for all `y` in a neighborhood of `0`. -/
def HasFPowerSeriesAt (f : E β F) (p : FormalMultilinearSeries π E F) (x : E) :=
β r, HasFPowerSeriesOnBall f p x r
#align has_fpower_series_at HasFPowerSeriesAt
variable (π)
/-- Given a function `f : E β F`, we say that `f` is analytic at `x` if it admits a convergent power
series expansion around `x`. -/
def AnalyticAt (f : E β F) (x : E) :=
β p : FormalMultilinearSeries π E F, HasFPowerSeriesAt f p x
#align analytic_at AnalyticAt
/-- Given a function `f : E β F`, we say that `f` is analytic on a set `s` if it is analytic around
every point of `s`. -/
def AnalyticOn (f : E β F) (s : Set E) :=
β x, x β s β AnalyticAt π f x
#align analytic_on AnalyticOn
variable {π}
theorem HasFPowerSeriesOnBall.hasFPowerSeriesAt (hf : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesAt f p x :=
β¨r, hfβ©
#align has_fpower_series_on_ball.has_fpower_series_at HasFPowerSeriesOnBall.hasFPowerSeriesAt
theorem HasFPowerSeriesAt.analyticAt (hf : HasFPowerSeriesAt f p x) : AnalyticAt π f x :=
β¨p, hfβ©
#align has_fpower_series_at.analytic_at HasFPowerSeriesAt.analyticAt
theorem HasFPowerSeriesOnBall.analyticAt (hf : HasFPowerSeriesOnBall f p x r) : AnalyticAt π f x :=
hf.hasFPowerSeriesAt.analyticAt
#align has_fpower_series_on_ball.analytic_at HasFPowerSeriesOnBall.analyticAt
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {y} hy => by
convert hf.hasSum hy using 1
apply hg.symm
simpa [edist_eq_coe_nnnorm_sub] using hy }
#align has_fpower_series_on_ball.congr HasFPowerSeriesOnBall.congr
/-- If a function `f` has a power series `p` around `x`, then the function `z β¦ f (z - y)` has the
same power series around `x + y`. -/
theorem HasFPowerSeriesOnBall.comp_sub (hf : HasFPowerSeriesOnBall f p x r) (y : E) :
HasFPowerSeriesOnBall (fun z => f (z - y)) p (x + y) r :=
{ r_le := hf.r_le
r_pos := hf.r_pos
hasSum := fun {z} hz => by
convert hf.hasSum hz using 2
abel }
#align has_fpower_series_on_ball.comp_sub HasFPowerSeriesOnBall.comp_sub
theorem HasFPowerSeriesOnBall.hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball x r) : HasSum (fun n : β => p n fun _ => y - x) (f y) := by
have : y - x β EMetric.ball (0 : E) r := by simpa [edist_eq_coe_nnnorm_sub] using hy
simpa only [add_sub_cancel'_right] using hf.hasSum this
#align has_fpower_series_on_ball.has_sum_sub HasFPowerSeriesOnBall.hasSum_sub
theorem HasFPowerSeriesOnBall.radius_pos (hf : HasFPowerSeriesOnBall f p x r) : 0 < p.radius :=
lt_of_lt_of_le hf.r_pos hf.r_le
#align has_fpower_series_on_ball.radius_pos HasFPowerSeriesOnBall.radius_pos
theorem HasFPowerSeriesAt.radius_pos (hf : HasFPowerSeriesAt f p x) : 0 < p.radius :=
let β¨_, hrβ© := hf
hr.radius_pos
#align has_fpower_series_at.radius_pos HasFPowerSeriesAt.radius_pos
theorem HasFPowerSeriesOnBall.mono (hf : HasFPowerSeriesOnBall f p x r) (r'_pos : 0 < r')
(hr : r' β€ r) : HasFPowerSeriesOnBall f p x r' :=
β¨le_trans hr hf.1, r'_pos, fun hy => hf.hasSum (EMetric.ball_subset_ball hr hy)β©
#align has_fpower_series_on_ball.mono HasFPowerSeriesOnBall.mono
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
rcases EMetric.mem_nhds_iff.mp hg with β¨rβ, hβpos, hββ©
exact β¨min rβ rβ,
(hβ.mono (lt_min hβ.r_pos hβpos) inf_le_left).congr
fun y hy => hβ (EMetric.ball_subset_ball inf_le_right hy)β©
#align has_fpower_series_at.congr HasFPowerSeriesAt.congr
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
βαΆ r : ββ₯0β in π[>] 0, HasFPowerSeriesOnBall f p x r :=
let β¨_, hrβ© := hf
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
hr.mono hr'.1 hr'.2.le
#align has_fpower_series_at.eventually HasFPowerSeriesAt.eventually
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) := by
filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
#align has_fpower_series_on_ball.eventually_has_sum HasFPowerSeriesOnBall.eventually_hasSum
theorem HasFPowerSeriesAt.eventually_hasSum (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π 0, HasSum (fun n : β => p n fun _ : Fin n => y) (f (x + y)) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum
#align has_fpower_series_at.eventually_has_sum HasFPowerSeriesAt.eventually_hasSum
theorem HasFPowerSeriesOnBall.eventually_hasSum_sub (hf : HasFPowerSeriesOnBall f p x r) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) := by
filter_upwards [EMetric.ball_mem_nhds x hf.r_pos] with y using hf.hasSum_sub
#align has_fpower_series_on_ball.eventually_has_sum_sub HasFPowerSeriesOnBall.eventually_hasSum_sub
theorem HasFPowerSeriesAt.eventually_hasSum_sub (hf : HasFPowerSeriesAt f p x) :
βαΆ y in π x, HasSum (fun n : β => p n fun _ : Fin n => y - x) (f y) :=
let β¨_, hrβ© := hf
hr.eventually_hasSum_sub
#align has_fpower_series_at.eventually_has_sum_sub HasFPowerSeriesAt.eventually_hasSum_sub
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
filter_upwards [hf.eventually_hasSum_sub] with z hz using hz.unique hasSum_zero
#align has_fpower_series_on_ball.eventually_eq_zero HasFPowerSeriesOnBall.eventually_eq_zero
theorem HasFPowerSeriesAt.eventually_eq_zero
(hf : HasFPowerSeriesAt f (0 : FormalMultilinearSeries π E F) x) : βαΆ z in π x, f z = 0 :=
let β¨_, hrβ© := hf
hr.eventually_eq_zero
#align has_fpower_series_at.eventually_eq_zero HasFPowerSeriesAt.eventually_eq_zero
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by simp, WithTop.zero_lt_top, fun _ => hasSum_single 0 fun n hn => _β©
simp [constFormalMultilinearSeries_apply hn]
#align has_fpower_series_on_ball_const hasFPowerSeriesOnBall_const
theorem hasFPowerSeriesAt_const {c : F} {e : E} :
HasFPowerSeriesAt (fun _ => c) (constFormalMultilinearSeries π E c) e :=
β¨β€, hasFPowerSeriesOnBall_constβ©
#align has_fpower_series_at_const hasFPowerSeriesAt_const
theorem analyticAt_const {v : F} : AnalyticAt π (fun _ => v) x :=
β¨constFormalMultilinearSeries π E v, hasFPowerSeriesAt_constβ©
#align analytic_at_const analyticAt_const
theorem analyticOn_const {v : F} {s : Set E} : AnalyticOn π (fun _ => v) s :=
fun _ _ => analyticAt_const
#align analytic_on_const analyticOn_const
theorem HasFPowerSeriesOnBall.add (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f + g) (pf + pg) x r :=
{ r_le := le_trans (le_min_iff.2 β¨hf.r_le, hg.r_leβ©) (pf.min_radius_le_radius_add pg)
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).add (hg.hasSum hy) }
#align has_fpower_series_on_ball.add HasFPowerSeriesOnBall.add
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
rcases (hf.eventually.and hg.eventually).exists with β¨r, hrβ©
exact β¨r, hr.1.add hr.2β©
#align has_fpower_series_at.add HasFPowerSeriesAt.add
theorem AnalyticAt.congr (hf : AnalyticAt π f x) (hg : f =αΆ [π x] g) : AnalyticAt π g x :=
let β¨_, hpfβ© := hf
(hpf.congr hg).analyticAt
theorem analyticAt_congr (h : f =αΆ [π x] g) : AnalyticAt π f x β AnalyticAt π g x :=
β¨fun hf β¦ hf.congr h, fun hg β¦ hg.congr h.symmβ©
theorem AnalyticAt.add (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) : AnalyticAt π (f + g) x :=
let β¨_, hpfβ© := hf
let β¨_, hqfβ© := hg
(hpf.add hqf).analyticAt
#align analytic_at.add AnalyticAt.add
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
exact hf.r_le
r_pos := hf.r_pos
hasSum := fun hy => (hf.hasSum hy).neg }
#align has_fpower_series_on_ball.neg HasFPowerSeriesOnBall.neg
theorem HasFPowerSeriesAt.neg (hf : HasFPowerSeriesAt f pf x) : HasFPowerSeriesAt (-f) (-pf) x :=
let β¨_, hrfβ© := hf
hrf.neg.hasFPowerSeriesAt
#align has_fpower_series_at.neg HasFPowerSeriesAt.neg
theorem AnalyticAt.neg (hf : AnalyticAt π f x) : AnalyticAt π (-f) x :=
let β¨_, hpfβ© := hf
hpf.neg.analyticAt
#align analytic_at.neg AnalyticAt.neg
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_on_ball.sub HasFPowerSeriesOnBall.sub
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align has_fpower_series_at.sub HasFPowerSeriesAt.sub
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
simpa only [sub_eq_add_neg] using hf.add hg.neg
#align analytic_at.sub AnalyticAt.sub
theorem AnalyticOn.mono {s t : Set E} (hf : AnalyticOn π f t) (hst : s β t) : AnalyticOn π f s :=
fun z hz => hf z (hst hz)
#align analytic_on.mono AnalyticOn.mono
theorem AnalyticOn.congr' {s : Set E} (hf : AnalyticOn π f s) (hg : f =αΆ [πΛ’ s] g) :
AnalyticOn π g s :=
fun z hz => (hf z hz).congr (mem_nhdsSet_iff_forall.mp hg z hz)
theorem analyticOn_congr' {s : Set E} (h : f =αΆ [πΛ’ s] g) : AnalyticOn π f s β AnalyticOn π g s :=
β¨fun hf => hf.congr' h, fun hg => hg.congr' h.symmβ©
theorem AnalyticOn.congr {s : Set E} (hs : IsOpen s) (hf : AnalyticOn π f s) (hg : s.EqOn f g) :
AnalyticOn π g s :=
hf.congr' $ mem_nhdsSet_iff_forall.mpr
(fun _ hz => eventuallyEq_iff_exists_mem.mpr β¨s, hs.mem_nhds hz, hgβ©)
theorem analyticOn_congr {s : Set E} (hs : IsOpen s) (h : s.EqOn f g) : AnalyticOn π f s β
AnalyticOn π g s := β¨fun hf => hf.congr hs h, fun hg => hg.congr hs h.symmβ©
theorem AnalyticOn.add {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f + g) s :=
fun z hz => (hf z hz).add (hg z hz)
#align analytic_on.add AnalyticOn.add
theorem AnalyticOn.sub {s : Set E} (hf : AnalyticOn π f s) (hg : AnalyticOn π g s) :
AnalyticOn π (f - g) s :=
fun z hz => (hf z hz).sub (hg z hz)
#align analytic_on.sub AnalyticOn.sub
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
have v_eq : v = fun i => 0 := Subsingleton.elim _ _
have zero_mem : (0 : E) β EMetric.ball (0 : E) r := by simp [hf.r_pos]
have : β i, i β 0 β (pf i fun j => 0) = 0 := by
intro i hi
have : 0 < i := pos_iff_ne_zero.2 hi
exact ContinuousMultilinearMap.map_coord_zero _ (β¨0, thisβ© : Fin i) rfl
have A := (hf.hasSum zero_mem).unique (hasSum_single _ this)
simpa [v_eq] using A.symm
#align has_fpower_series_on_ball.coeff_zero HasFPowerSeriesOnBall.coeff_zero
theorem HasFPowerSeriesAt.coeff_zero (hf : HasFPowerSeriesAt f pf x) (v : Fin 0 β E) :
pf 0 v = f x :=
let β¨_, hrfβ© := hf
hrf.coeff_zero v
#align has_fpower_series_at.coeff_zero HasFPowerSeriesAt.coeff_zero
/-- If a function `f` has a power series `p` on a ball and `g` is linear, then `g β f` has the
power series `g β p` on the same ball. -/
theorem ContinuousLinearMap.comp_hasFPowerSeriesOnBall (g : F βL[π] G)
(h : HasFPowerSeriesOnBall f p x r) :
HasFPowerSeriesOnBall (g β f) (g.compFormalMultilinearSeries p) x r :=
{ r_le := h.r_le.trans (p.radius_le_radius_continuousLinearMap_comp _)
r_pos := h.r_pos
hasSum := fun hy => by
simpa only [ContinuousLinearMap.compFormalMultilinearSeries_apply,
ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_apply] using
g.hasSum (h.hasSum hy) }
#align continuous_linear_map.comp_has_fpower_series_on_ball ContinuousLinearMap.comp_hasFPowerSeriesOnBall
/-- If a function `f` is analytic on a set `s` and `g` is linear, then `g β f` is analytic
on `s`. -/
theorem ContinuousLinearMap.comp_analyticOn {s : Set E} (g : F βL[π] G) (h : AnalyticOn π f s) :
AnalyticOn π (g β f) s := by
rintro x hx
rcases h x hx with β¨p, r, hpβ©
exact β¨g.compFormalMultilinearSeries p, r, g.comp_hasFPowerSeriesOnBall hpβ©
#align continuous_linear_map.comp_analytic_on ContinuousLinearMap.comp_analyticOn
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence.
This version provides an upper estimate that decreases both in `βyβ` and `n`. See also
`HasFPowerSeriesOnBall.uniform_geometric_approx` for a weaker version. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx' {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β n, βp nβ * (r' : β) ^ n β€ C * a ^ n :=
p.norm_mul_pow_le_mul_pow_of_lt_radius (h.trans_le hf.r_le)
refine' β¨a, ha, C / (1 - a), div_pos hC (sub_pos.2 ha.2), fun y hy n => _β©
have yr' : βyβ < r' := by
rw [ball_zero_eq] at hy
exact hy
have hr'0 : 0 < (r' : β) := (norm_nonneg _).trans_lt yr'
have : y β EMetric.ball (0 : E) r := by
refine' mem_emetric_ball_zero_iff.2 (lt_trans _ h)
exact mod_cast yr'
rw [norm_sub_rev, β mul_div_right_comm]
have ya : a * (βyβ / βr') β€ a :=
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)
suffices βp.partialSum n y - f (x + y)β β€ C * (a * (βyβ / r')) ^ n / (1 - a * (βyβ / r')) by
refine' this.trans _
have : 0 < a := ha.1
gcongr
apply_rules [sub_pos.2, ha.2]
apply norm_sub_le_of_geometric_bound_of_hasSum (ya.trans_lt ha.2) _ (hf.hasSum this)
intro n
calc
β(p n) fun _ : Fin n => yβ
_ β€ βp nβ * β _i : Fin n, βyβ := ContinuousMultilinearMap.le_op_norm _ _
_ = βp nβ * (r' : β) ^ n * (βyβ / r') ^ n := by field_simp [mul_right_comm]
_ β€ C * a ^ n * (βyβ / r') ^ n := by gcongr ?_ * _; apply hp
_ β€ C * (a * (βyβ / r')) ^ n := by rw [mul_pow, mul_assoc]
#align has_fpower_series_on_ball.uniform_geometric_approx' HasFPowerSeriesOnBall.uniform_geometric_approx'
/-- If a function admits a power series expansion, then it is exponentially close to the partial
sums of this power series on strict subdisks of the disk of convergence. -/
theorem HasFPowerSeriesOnBall.uniform_geometric_approx {r' : ββ₯0}
(hf : HasFPowerSeriesOnBall f p x r) (h : (r' : ββ₯0β) < r) :
β a β Ioo (0 : β) 1,
β C > 0, β y β Metric.ball (0 : E) r', β n, βf (x + y) - p.partialSum n yβ β€ C * a ^ n := by
obtain β¨a, ha, C, hC, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' β¨a, ha, C, hC, fun y hy n => (hp y hy n).trans _β©
have yr' : βyβ < r' := by rwa [ball_zero_eq] at hy
gcongr
exacts [mul_nonneg ha.1.le (div_nonneg (norm_nonneg y) r'.coe_nonneg),
mul_le_of_le_one_right ha.1.le (div_le_one_of_le yr'.le r'.coe_nonneg)]
#align has_fpower_series_on_ball.uniform_geometric_approx HasFPowerSeriesOnBall.uniform_geometric_approx
/-- Taylor formula for an analytic function, `IsBigO` version. -/
theorem HasFPowerSeriesAt.isBigO_sub_partialSum_pow (hf : HasFPowerSeriesAt f p x) (n : β) :
(fun y : E => f (x + y) - p.partialSum n y) =O[π 0] fun y => βyβ ^ n := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
obtain β¨a, -, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * (a * (βyβ / r')) ^ n :=
hf.uniform_geometric_approx' h
refine' isBigO_iff.2 β¨C * (a / r') ^ n, _β©
replace r'0 : 0 < (r' : β); Β· exact mod_cast r'0
filter_upwards [Metric.ball_mem_nhds (0 : E) r'0] with y hy
simpa [mul_pow, mul_div_assoc, mul_assoc, div_mul_eq_mul_div] using hp y hy n
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_sub_partial_sum_pow HasFPowerSeriesAt.isBigO_sub_partialSum_pow
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. This lemma formulates this property using `IsBigO` and
`Filter.principal` on `E Γ E`. -/
theorem HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
(hf : HasFPowerSeriesOnBall f p x r) (hr : r' < r) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (EMetric.ball (x, x) r')]
fun y => βy - (x, x)β * βy.1 - y.2β := by
lift r' to ββ₯0 using ne_top_of_lt hr
rcases (zero_le r').eq_or_lt with (rfl | hr'0)
Β· simp only [isBigO_bot, EMetric.ball_zero, principal_empty, ENNReal.coe_zero]
obtain β¨a, ha, C, hC : 0 < C, hpβ© :
β a β Ioo (0 : β) 1, β C > 0, β n : β, βp nβ * (r' : β) ^ n β€ C * a ^ n
exact p.norm_mul_pow_le_mul_pow_of_lt_radius (hr.trans_le hf.r_le)
simp only [β le_div_iff (pow_pos (NNReal.coe_pos.2 hr'0) _)] at hp
set L : E Γ E β β := fun y =>
C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * (a / (1 - a) ^ 2 + 2 / (1 - a))
have hL : β y β EMetric.ball (x, x) r', βf y.1 - f y.2 - p 1 fun _ => y.1 - y.2β β€ L y := by
intro y hy'
have hy : y β EMetric.ball x r ΓΛ’ EMetric.ball x r := by
rw [EMetric.ball_prod_same]
exact EMetric.ball_subset_ball hr.le hy'
set A : β β F := fun n => (p n fun _ => y.1 - x) - p n fun _ => y.2 - x
have hA : HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) := by
convert (hasSum_nat_add_iff' 2).2 ((hf.hasSum_sub hy.1).sub (hf.hasSum_sub hy.2)) using 1
rw [Finset.sum_range_succ, Finset.sum_range_one, hf.coeff_zero, hf.coeff_zero, sub_self,
zero_add, β Subsingleton.pi_single_eq (0 : Fin 1) (y.1 - x), Pi.single,
β Subsingleton.pi_single_eq (0 : Fin 1) (y.2 - x), Pi.single, β (p 1).map_sub, β Pi.single,
Subsingleton.pi_single_eq, sub_sub_sub_cancel_right]
rw [EMetric.mem_ball, edist_eq_coe_nnnorm_sub, ENNReal.coe_lt_coe] at hy'
set B : β β β := fun n => C * (a / r') ^ 2 * (βy - (x, x)β * βy.1 - y.2β) * ((n + 2) * a ^ n)
have hAB : β n, βA (n + 2)β β€ B n := fun n =>
calc
βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β := by
-- porting note: `pi_norm_const` was `pi_norm_const (_ : E)`
simpa only [Fintype.card_fin, pi_norm_const, Prod.norm_def, Pi.sub_def,
Prod.fst_sub, Prod.snd_sub, sub_sub_sub_cancel_right] using
(p <| n + 2).norm_image_sub_le (fun _ => y.1 - x) fun _ => y.2 - x
_ = βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
rw [pow_succ βy - (x, x)β]
ring
-- porting note: the two `β` in `βr'` are new, without them, Lean fails to synthesize
-- instances `HDiv β ββ₯0 ?m` or `HMul β ββ₯0 ?m`
_ β€ C * a ^ (n + 2) / βr' ^ (n + 2)
* βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) := by
have : 0 < a := ha.1
gcongr
Β· apply hp
Β· apply hy'.le
_ = B n := by
-- porting note: in the original, `B` was in the `field_simp`, but now Lean does not
-- accept it. The current proof works in Lean 4, but does not in Lean 3.
field_simp [pow_succ]
simp only [mul_assoc, mul_comm, mul_left_comm]
have hBL : HasSum B (L y) := by
apply HasSum.mul_left
simp only [add_mul]
have : βaβ < 1 := by simp only [Real.norm_eq_abs, abs_of_pos ha.1, ha.2]
rw [div_eq_mul_inv, div_eq_mul_inv]
exact (hasSum_coe_mul_geometric_of_norm_lt_1 this).add -- porting note: was `convert`!
((hasSum_geometric_of_norm_lt_1 this).mul_left 2)
exact hA.norm_le_of_bounded hBL hAB
suffices L =O[π (EMetric.ball (x, x) r')] fun y => βy - (x, x)β * βy.1 - y.2β by
refine' (IsBigO.of_bound 1 (eventually_principal.2 fun y hy => _)).trans this
rw [one_mul]
exact (hL y hy).trans (le_abs_self _)
simp_rw [mul_right_comm _ (_ * _)] -- porting note: there was an `L` inside the `simp_rw`.
exact (isBigO_refl _ _).const_mul_left _
set_option linter.uppercaseLean3 false in
#align has_fpower_series_on_ball.is_O_image_sub_image_sub_deriv_principal HasFPowerSeriesOnBall.isBigO_image_sub_image_sub_deriv_principal
/-- If `f` has formal power series `β n, pβ` on a ball of radius `r`, then for `y, z` in any smaller
ball, the norm of the difference `f y - f z - p 1 (fun _ β¦ y - z)` is bounded above by
`C * (max βy - xβ βz - xβ) * βy - zβ`. -/
theorem HasFPowerSeriesOnBall.image_sub_sub_deriv_le (hf : HasFPowerSeriesOnBall f p x r)
(hr : r' < r) :
β C, βα΅ (y β EMetric.ball x r') (z β EMetric.ball x r'),
βf y - f z - p 1 fun _ => y - zβ β€ C * max βy - xβ βz - xβ * βy - zβ := by
simpa only [isBigO_principal, mul_assoc, norm_mul, norm_norm, Prod.forall, EMetric.mem_ball,
Prod.edist_eq, max_lt_iff, and_imp, @forall_swap (_ < _) E] using
hf.isBigO_image_sub_image_sub_deriv_principal hr
#align has_fpower_series_on_ball.image_sub_sub_deriv_le HasFPowerSeriesOnBall.image_sub_sub_deriv_le
/-- If `f` has formal power series `β n, pβ` at `x`, then
`f y - f z - p 1 (fun _ β¦ y - z) = O(β(y, z) - (x, x)β * βy - zβ)` as `(y, z) β (x, x)`.
In particular, `f` is strictly differentiable at `x`. -/
theorem HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub (hf : HasFPowerSeriesAt f p x) :
(fun y : E Γ E => f y.1 - f y.2 - p 1 fun _ => y.1 - y.2) =O[π (x, x)] fun y =>
βy - (x, x)β * βy.1 - y.2β := by
rcases hf with β¨r, hfβ©
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hf.r_pos with β¨r', r'0, hβ©
refine' (hf.isBigO_image_sub_image_sub_deriv_principal h).mono _
exact le_principal_iff.2 (EMetric.ball_mem_nhds _ r'0)
set_option linter.uppercaseLean3 false in
#align has_fpower_series_at.is_O_image_sub_norm_mul_norm_sub HasFPowerSeriesAt.isBigO_image_sub_norm_mul_norm_sub
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f (x + y)`
is the uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(Metric.ball (0 : E) r') := by
obtain β¨a, ha, C, -, hpβ© : β a β Ioo (0 : β) 1, β C > 0, β y β Metric.ball (0 : E) r', β n,
βf (x + y) - p.partialSum n yβ β€ C * a ^ n
exact hf.uniform_geometric_approx h
refine' Metric.tendstoUniformlyOn_iff.2 fun Ξ΅ Ξ΅pos => _
have L : Tendsto (fun n => (C : β) * a ^ n) atTop (π ((C : β) * 0)) :=
tendsto_const_nhds.mul (tendsto_pow_atTop_nhds_0_of_lt_1 ha.1.le ha.2)
rw [mul_zero] at L
refine' (L.eventually (gt_mem_nhds Ξ΅pos)).mono fun n hn y hy => _
rw [dist_eq_norm]
exact (hp y hy n).trans_lt hn
#align has_fpower_series_on_ball.tendsto_uniformly_on HasFPowerSeriesOnBall.tendstoUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f (x + y)`
is the locally uniform limit of `p.partialSum n y` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n y) (fun y => f (x + y)) atTop
(EMetric.ball (0 : E) r) := by
intro u hu x hx
rcases ENNReal.lt_iff_exists_nnreal_btwn.1 hx with β¨r', xr', hr'β©
have : EMetric.ball (0 : E) r' β π x := IsOpen.mem_nhds EMetric.isOpen_ball xr'
refine' β¨EMetric.ball (0 : E) r', mem_nhdsWithin_of_mem_nhds this, _β©
simpa [Metric.emetric_ball_nnreal] using hf.tendstoUniformlyOn hr' u hu
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn
/-- If a function admits a power series expansion at `x`, then it is the uniform limit of the
partial sums of this power series on strict subdisks of the disk of convergence, i.e., `f y`
is the uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoUniformlyOn' {r' : ββ₯0} (hf : HasFPowerSeriesOnBall f p x r)
(h : (r' : ββ₯0β) < r) :
TendstoUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop (Metric.ball (x : E) r') := by
convert (hf.tendstoUniformlyOn h).comp fun y => y - x using 1
Β· simp [(Β· β Β·)]
Β· ext z
simp [dist_eq_norm]
#align has_fpower_series_on_ball.tendsto_uniformly_on' HasFPowerSeriesOnBall.tendstoUniformlyOn'
/-- If a function admits a power series expansion at `x`, then it is the locally uniform limit of
the partial sums of this power series on the disk of convergence, i.e., `f y`
is the locally uniform limit of `p.partialSum n (y - x)` there. -/
theorem HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn' (hf : HasFPowerSeriesOnBall f p x r) :
TendstoLocallyUniformlyOn (fun n y => p.partialSum n (y - x)) f atTop
(EMetric.ball (x : E) r) := by
have A : ContinuousOn (fun y : E => y - x) (EMetric.ball (x : E) r) :=
(continuous_id.sub continuous_const).continuousOn
convert hf.tendstoLocallyUniformlyOn.comp (fun y : E => y - x) _ A using 1
Β· ext z
simp
Β· intro z
simp [edist_eq_coe_nnnorm, edist_eq_coe_nnnorm_sub]
#align has_fpower_series_on_ball.tendsto_locally_uniformly_on' HasFPowerSeriesOnBall.tendstoLocallyUniformlyOn'
/-- If a function admits a power series expansion on a disk, then it is continuous there. -/
protected theorem HasFPowerSeriesOnBall.continuousOn (hf : HasFPowerSeriesOnBall f p x r) :
ContinuousOn f (EMetric.ball x r) :=
hf.tendstoLocallyUniformlyOn'.continuousOn <|
eventually_of_forall fun n =>
((p.partialSum_continuous n).comp (continuous_id.sub continuous_const)).continuousOn
#align has_fpower_series_on_ball.continuous_on HasFPowerSeriesOnBall.continuousOn
protected theorem HasFPowerSeriesAt.continuousAt (hf : HasFPowerSeriesAt f p x) :
ContinuousAt f x :=
let β¨_, hrβ© := hf
hr.continuousOn.continuousAt (EMetric.ball_mem_nhds x hr.r_pos)
#align has_fpower_series_at.continuous_at HasFPowerSeriesAt.continuousAt
protected theorem AnalyticAt.continuousAt (hf : AnalyticAt π f x) : ContinuousAt f x :=
let β¨_, hpβ© := hf
hp.continuousAt
#align analytic_at.continuous_at AnalyticAt.continuousAt
protected theorem AnalyticOn.continuousOn {s : Set E} (hf : AnalyticOn π f s) : ContinuousOn f s :=
fun x hx => (hf x hx).continuousAt.continuousWithinAt
#align analytic_on.continuous_on AnalyticOn.continuousOn
/-- Analytic everywhere implies continuous -/
theorem AnalyticOn.continuous {f : E β F} (fa : AnalyticOn π f univ) : Continuous f := by
rw [continuous_iff_continuousOn_univ]; exact fa.continuousOn
/-- In a complete space, the sum of a converging power series `p` admits `p` as a power series.
This is not totally obvious as we need to check the convergence of the series. -/
protected theorem FormalMultilinearSeries.hasFPowerSeriesOnBall [CompleteSpace F]
(p : FormalMultilinearSeries π E F) (h : 0 < p.radius) :
HasFPowerSeriesOnBall p.sum p 0 p.radius :=
{ r_le := le_rfl
r_pos := h
hasSum := fun hy => by
rw [zero_add]
exact p.hasSum hy }
#align formal_multilinear_series.has_fpower_series_on_ball FormalMultilinearSeries.hasFPowerSeriesOnBall
theorem HasFPowerSeriesOnBall.sum (h : HasFPowerSeriesOnBall f p x r) {y : E}
(hy : y β EMetric.ball (0 : E) r) : f (x + y) = p.sum y :=
(h.hasSum hy).tsum_eq.symm
#align has_fpower_series_on_ball.sum HasFPowerSeriesOnBall.sum
/-- The sum of a converging power series is continuous in its disk of convergence. -/
protected theorem FormalMultilinearSeries.continuousOn [CompleteSpace F] :
ContinuousOn p.sum (EMetric.ball 0 p.radius) := by
rcases (zero_le p.radius).eq_or_lt with h | h
Β· simp [β h, continuousOn_empty]
Β· exact (p.hasFPowerSeriesOnBall h).continuousOn
#align formal_multilinear_series.continuous_on FormalMultilinearSeries.continuousOn
end
/-!
### Uniqueness of power series
If a function `f : E β F` has two representations as power series at a point `x : E`, corresponding
to formal multilinear series `pβ` and `pβ`, then these representations agree term-by-term. That is,
for any `n : β` and `y : E`, `pβ n (fun i β¦ y) = pβ n (fun i β¦ y)`. In the one-dimensional case,
when `f : π β E`, the continuous multilinear maps `pβ n` and `pβ n` are given by
`ContinuousMultilinearMap.mkPiField`, and hence are determined completely by the value of
`pβ n (fun i β¦ 1)`, so `pβ = pβ`. Consequently, the radius of convergence for one series can be
transferred to the other.
-/
section Uniqueness
open ContinuousMultilinearMap
theorem Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero {n : β} {p : E[Γn]βL[π] F}
(h : (fun y => p fun _ => y) =O[π 0] fun y => βyβ ^ (n + 1)) (y : E) : (p fun _ => y) = 0 := by
obtain β¨c, c_pos, hcβ© := h.exists_pos
obtain β¨t, ht, t_open, z_memβ© := eventually_nhds_iff.mp (isBigOWith_iff.mp hc)
obtain β¨Ξ΄, Ξ΄_pos, δΡ⩠:= (Metric.isOpen_iff.mp t_open) 0 z_mem
clear h hc z_mem
cases' n with n
Β· exact norm_eq_zero.mp (by
-- porting note: the symmetric difference of the `simpa only` sets:
-- added `Nat.zero_eq, zero_add, pow_one`
-- removed `zero_pow', Ne.def, Nat.one_ne_zero, not_false_iff`
simpa only [Nat.zero_eq, fin0_apply_norm, norm_eq_zero, norm_zero, zero_add, pow_one,
mul_zero, norm_le_zero_iff] using ht 0 (δΡ (Metric.mem_ball_self δ_pos)))
Β· refine' Or.elim (Classical.em (y = 0))
(fun hy => by simpa only [hy] using p.map_zero) fun hy => _
replace hy := norm_pos_iff.mpr hy
refine' norm_eq_zero.mp (le_antisymm (le_of_forall_pos_le_add fun Ξ΅ Ξ΅_pos => _) (norm_nonneg _))
have hβ := _root_.mul_pos c_pos (pow_pos hy (n.succ + 1))
obtain β¨k, k_pos, k_normβ© := NormedField.exists_norm_lt π
(lt_min (mul_pos Ξ΄_pos (inv_pos.mpr hy)) (mul_pos Ξ΅_pos (inv_pos.mpr hβ)))
have hβ : βk β’ yβ < Ξ΄ := by
rw [norm_smul]
exact inv_mul_cancel_rightβ hy.ne.symm Ξ΄ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_left _ _)) hy
have hβ :=
calc
βp fun _ => k β’ yβ β€ c * βk β’ yβ ^ (n.succ + 1) := by
-- porting note: now Lean wants `_root_.`
simpa only [norm_pow, _root_.norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
--simpa only [norm_pow, norm_norm] using ht (k β’ y) (δΡ (mem_ball_zero_iff.mpr hβ))
_ = βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
-- porting note: added `Nat.succ_eq_add_one` since otherwise `ring` does not conclude.
simp only [norm_smul, mul_pow, Nat.succ_eq_add_one]
-- porting note: removed `rw [pow_succ]`, since it now becomes superfluous.
ring
have hβ : βkβ * (c * βyβ ^ (n.succ + 1)) < Ξ΅ :=
inv_mul_cancel_rightβ hβ.ne.symm Ξ΅ βΈ
mul_lt_mul_of_pos_right (lt_of_lt_of_le k_norm (min_le_right _ _)) hβ
calc
βp fun _ => yβ = βkβ»ΒΉ ^ n.succβ * βp fun _ => k β’ yβ := by
simpa only [inv_smul_smulβ (norm_pos_iff.mp k_pos), norm_smul, Finset.prod_const,
Finset.card_fin] using
congr_arg norm (p.map_smul_univ (fun _ : Fin n.succ => kβ»ΒΉ) fun _ : Fin n.succ => k β’ y)
_ β€ βkβ»ΒΉ ^ n.succβ * (βkβ ^ n.succ * (βkβ * (c * βyβ ^ (n.succ + 1)))) := by gcongr
_ = β(kβ»ΒΉ * k) ^ n.succβ * (βkβ * (c * βyβ ^ (n.succ + 1))) := by
rw [β mul_assoc]
simp [norm_mul, mul_pow]
_ β€ 0 + Ξ΅ := by
rw [inv_mul_cancel (norm_pos_iff.mp k_pos)]
simpa using hβ.le
set_option linter.uppercaseLean3 false in
#align asymptotics.is_O.continuous_multilinear_map_apply_eq_zero Asymptotics.IsBigO.continuousMultilinearMap_apply_eq_zero
/-- If a formal multilinear series `p` represents the zero function at `x : E`, then the
terms `p n (fun i β¦ y)` appearing in the sum are zero for any `n : β`, `y : E`. -/
theorem HasFPowerSeriesAt.apply_eq_zero {p : FormalMultilinearSeries π E F} {x : E}
(h : HasFPowerSeriesAt 0 p x) (n : β) : β y : E, (p n fun _ => y) = 0 := by
refine' Nat.strong_induction_on n fun k hk => _
have psum_eq : p.partialSum (k + 1) = fun y => p k fun _ => y := by
funext z
refine' Finset.sum_eq_single _ (fun b hb hnb => _) fun hn => _
Β· have := Finset.mem_range_succ_iff.mp hb
simp only [hk b (this.lt_of_ne hnb), Pi.zero_apply]
Β· exact False.elim (hn (Finset.mem_range.mpr (lt_add_one k)))
replace h := h.isBigO_sub_partialSum_pow k.succ
simp only [psum_eq, zero_sub, Pi.zero_apply, Asymptotics.isBigO_neg_left] at h
exact h.continuousMultilinearMap_apply_eq_zero
#align has_fpower_series_at.apply_eq_zero HasFPowerSeriesAt.apply_eq_zero
/-- A one-dimensional formal multilinear series representing the zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero {p : FormalMultilinearSeries π π E} {x : π}
(h : HasFPowerSeriesAt 0 p x) : p = 0 := by
-- porting note: `funext; ext` was `ext (n x)`
funext n
ext x
rw [β mkPiField_apply_one_eq_self (p n)]
-- porting note: nasty hack, was `simp [h.apply_eq_zero n 1]`
have := Or.intro_right ?_ (h.apply_eq_zero n 1)
simpa using this
#align has_fpower_series_at.eq_zero HasFPowerSeriesAt.eq_zero
/-- One-dimensional formal multilinear series representing the same function are equal. -/
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries {pβ pβ : FormalMultilinearSeries π π E}
{f : π β E} {x : π} (hβ : HasFPowerSeriesAt f pβ x) (hβ : HasFPowerSeriesAt f pβ x) : pβ = pβ :=
sub_eq_zero.mp (HasFPowerSeriesAt.eq_zero (by simpa only [sub_self] using hβ.sub hβ))
#align has_fpower_series_at.eq_formal_multilinear_series HasFPowerSeriesAt.eq_formalMultilinearSeries
theorem HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
{p q : FormalMultilinearSeries π π E} {f g : π β E} {x : π} (hp : HasFPowerSeriesAt f p x)
(hq : HasFPowerSeriesAt g q x) (heq : βαΆ z in π x, f z = g z) : p = q :=
(hp.congr heq).eq_formalMultilinearSeries hq
#align has_fpower_series_at.eq_formal_multilinear_series_of_eventually HasFPowerSeriesAt.eq_formalMultilinearSeries_of_eventually
/-- A one-dimensional formal multilinear series representing a locally zero function is zero. -/
theorem HasFPowerSeriesAt.eq_zero_of_eventually {p : FormalMultilinearSeries π π E} {f : π β E}
{x : π} (hp : HasFPowerSeriesAt f p x) (hf : f =αΆ [π x] 0) : p = 0 :=
(hp.congr hf).eq_zero
#align has_fpower_series_at.eq_zero_of_eventually HasFPowerSeriesAt.eq_zero_of_eventually
/-- If a function `f : π β E` has two power series representations at `x`, then the given radii in
which convergence is guaranteed may be interchanged. This can be useful when the formal multilinear
series in one representation has a particularly nice form, but the other has a larger radius. -/
theorem HasFPowerSeriesOnBall.exchange_radius {pβ pβ : FormalMultilinearSeries π π E} {f : π β E}
{rβ rβ : ββ₯0β} {x : π} (hβ : HasFPowerSeriesOnBall f pβ x rβ)
(hβ : HasFPowerSeriesOnBall f pβ x rβ) : HasFPowerSeriesOnBall f pβ x rβ :=
hβ.hasFPowerSeriesAt.eq_formalMultilinearSeries hβ.hasFPowerSeriesAt βΈ hβ
#align has_fpower_series_on_ball.exchange_radius HasFPowerSeriesOnBall.exchange_radius
/-- If a function `f : π β E` has power series representation `p` on a ball of some radius and for
each positive radius it has some power series representation, then `p` converges to `f` on the whole
`π`. -/
theorem HasFPowerSeriesOnBall.r_eq_top_of_exists {f : π β E} {r : ββ₯0β} {x : π}
{p : FormalMultilinearSeries π π E} (h : HasFPowerSeriesOnBall f p x r)
(h' : β (r' : ββ₯0) (_ : 0 < r'), β p' : FormalMultilinearSeries π π E,
HasFPowerSeriesOnBall f p' x r') :
HasFPowerSeriesOnBall f p x β :=
{ r_le := ENNReal.le_of_forall_pos_nnreal_lt fun r hr _ =>
let β¨_, hp'β© := h' r hr
(h.exchange_radius hp').r_le
r_pos := ENNReal.coe_lt_top
hasSum := fun {y} _ =>
let β¨r', hr'β© := exists_gt βyββ
let β¨_, hp'β© := h' r' hr'.ne_bot.bot_lt
(h.exchange_radius hp').hasSum <| mem_emetric_ball_zero_iff.mpr (ENNReal.coe_lt_coe.2 hr') }
#align has_fpower_series_on_ball.r_eq_top_of_exists HasFPowerSeriesOnBall.r_eq_top_of_exists
end Uniqueness
/-!
### Changing origin in a power series
If a function is analytic in a disk `D(x, R)`, then it is analytic in any disk contained in that
one. Indeed, one can write
$$
f (x + y + z) = \sum_{n} p_n (y + z)^n = \sum_{n, k} \binom{n}{k} p_n y^{n-k} z^k
= \sum_{k} \Bigl(\sum_{n} \binom{n}{k} p_n y^{n-k}\Bigr) z^k.
$$
The corresponding power series has thus a `k`-th coefficient equal to
$\sum_{n} \binom{n}{k} p_n y^{n-k}$. In the general case where `pβ` is a multilinear map, this has
to be interpreted suitably: instead of having a binomial coefficient, one should sum over all
possible subsets `s` of `Fin n` of cardinal `k`, and attribute `z` to the indices in `s` and
`y` to the indices outside of `s`.
In this paragraph, we implement this. The new power series is called `p.changeOrigin y`. Then, we
check its convergence and the fact that its sum coincides with the original sum. The outcome of this
discussion is that the set of points where a function is analytic is open.
-/
namespace FormalMultilinearSeries
section
variable (p : FormalMultilinearSeries π E F) {x y : E} {r R : ββ₯0}
/-- A term of `FormalMultilinearSeries.changeOriginSeries`.
Given a formal multilinear series `p` and a point `x` in its ball of convergence,
`p.changeOrigin x` is a formal multilinear series such that
`p.sum (x+y) = (p.changeOrigin x).sum y` when this makes sense. Each term of `p.changeOrigin x`
is itself an analytic function of `x` given by the series `p.changeOriginSeries`. Each term in
`changeOriginSeries` is the sum of `changeOriginSeriesTerm`'s over all `s` of cardinality `l`.
The definition is such that `p.changeOriginSeriesTerm k l s hs (fun _ β¦ x) (fun _ β¦ y) =
p (k + l) (s.piecewise (fun _ β¦ x) (fun _ β¦ y))`
-/
def changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
E[Γl]βL[π] E[Γk]βL[π] F := by
let a := ContinuousMultilinearMap.curryFinFinset π E F hs
(by erw [Finset.card_compl, Fintype.card_fin, hs, add_tsub_cancel_right])
exact a (p (k + l))
#align formal_multilinear_series.change_origin_series_term FormalMultilinearSeries.changeOriginSeriesTerm
theorem changeOriginSeriesTerm_apply (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l)
(x y : E) :
(p.changeOriginSeriesTerm k l s hs (fun _ => x) fun _ => y) =
p (k + l) (s.piecewise (fun _ => x) fun _ => y) :=
ContinuousMultilinearMap.curryFinFinset_apply_const _ _ _ _ _
#align formal_multilinear_series.change_origin_series_term_apply FormalMultilinearSeries.changeOriginSeriesTerm_apply
@[simp]
theorem norm_changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
βp.changeOriginSeriesTerm k l s hsβ = βp (k + l)β := by
simp only [changeOriginSeriesTerm, LinearIsometryEquiv.norm_map]
#align formal_multilinear_series.norm_change_origin_series_term FormalMultilinearSeries.norm_changeOriginSeriesTerm
@[simp]
theorem nnnorm_changeOriginSeriesTerm (k l : β) (s : Finset (Fin (k + l))) (hs : s.card = l) :
βp.changeOriginSeriesTerm k l s hsββ = βp (k + l)ββ := by
simp only [changeOriginSeriesTerm, LinearIsometryEquiv.nnnorm_map]
#align formal_multilinear_series.nnnorm_change_origin_series_term FormalMultilinearSeries.nnnorm_changeOriginSeriesTerm
theorem nnnorm_changeOriginSeriesTerm_apply_le (k l : β) (s : Finset (Fin (k + l)))
(hs : s.card = l) (x y : E) :
βp.changeOriginSeriesTerm k l s hs (fun _ => x) fun _ => yββ β€
βp (k + l)ββ * βxββ ^ l * βyββ ^ k := by
|
rw [β p.nnnorm_changeOriginSeriesTerm k l s hs, β Fin.prod_const, β Fin.prod_const]
|
theorem nnnorm_changeOriginSeriesTerm_apply_le (k l : β) (s : Finset (Fin (k + l)))
(hs : s.card = l) (x y : E) :
βp.changeOriginSeriesTerm k l s hs (fun _ => x) fun _ => yββ β€
βp (k + l)ββ * βxββ ^ l * βyββ ^ k := by
|
Mathlib.Analysis.Analytic.Basic.1145_0.jQw1fRSE1vGpOll
|
theorem nnnorm_changeOriginSeriesTerm_apply_le (k l : β) (s : Finset (Fin (k + l)))
(hs : s.card = l) (x y : E) :
βp.changeOriginSeriesTerm k l s hs (fun _ => x) fun _ => yββ β€
βp (k + l)ββ * βxββ ^ l * βyββ ^ k
|
Mathlib_Analysis_Analytic_Basic
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.