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
|
---|---|---|---|---|---|---|
case h.e'_6.a
π : 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
hg : EqOn f g (EMetric.ball x r)
y : E
hy : y β EMetric.ball 0 r
β’ x + y β 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
|
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
|
Mathlib.Analysis.Analytic.Basic.422_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.congr (hf : HasFPowerSeriesOnBall f p x r)
(hg : EqOn f g (EMetric.ball x r)) : HasFPowerSeriesOnBall g p x 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
y z : E
hz : z β EMetric.ball 0 r
β’ HasSum (fun n => (p n) fun x => z) (f (x + y + z - 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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.432_0.jQw1fRSE1vGpOll
|
/-- 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
|
Mathlib_Analysis_Analytic_Basic
|
case h.e'_6.h.e'_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
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
y z : E
hz : z β EMetric.ball 0 r
β’ x + y + z - 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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.432_0.jQw1fRSE1vGpOll
|
/-- 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
|
Mathlib_Analysis_Analytic_Basic
|
case h.e'_6.h.e'_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
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
y z : E
hz : z β EMetric.ball 0 r
β’ x + y + z - 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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.432_0.jQw1fRSE1vGpOll
|
/-- 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
|
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
y : E
hy : y β EMetric.ball x r
β’ HasSum (fun n => (p n) fun x_1 => y - x) (f 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
|
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
|
Mathlib.Analysis.Analytic.Basic.443_0.jQw1fRSE1vGpOll
|
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)
|
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
y : E
hy : y β EMetric.ball x r
β’ y - x β 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
|
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
|
Mathlib.Analysis.Analytic.Basic.443_0.jQw1fRSE1vGpOll
|
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)
|
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
y : E
hy : y β EMetric.ball x r
this : y - x β EMetric.ball 0 r
β’ HasSum (fun n => (p n) fun x_1 => y - x) (f 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
|
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
|
Mathlib.Analysis.Analytic.Basic.443_0.jQw1fRSE1vGpOll
|
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)
|
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
hg : f =αΆ [π x] g
β’ HasFPowerSeriesAt g p 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ββ©
|
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
|
Mathlib.Analysis.Analytic.Basic.463_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x
|
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' : ββ₯0β
hg : f =αΆ [π x] g
rβ : ββ₯0β
hβ : HasFPowerSeriesOnBall f p x rβ
β’ HasFPowerSeriesAt g p 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ββ©
|
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x := by
rcases hf with β¨rβ, hββ©
|
Mathlib.Analysis.Analytic.Basic.463_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x
|
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' : ββ₯0β
hg : f =αΆ [π x] g
rβ : ββ₯0β
hβ : HasFPowerSeriesOnBall f p x rβ
rβ : ββ₯0β
hβpos : rβ > 0
hβ : EMetric.ball x rβ β {x | (fun x => f x = g x) x}
β’ HasFPowerSeriesAt g p 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)β©
|
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ββ©
|
Mathlib.Analysis.Analytic.Basic.463_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesAt.congr (hf : HasFPowerSeriesAt f p x) (hg : f =αΆ [π x] g) :
HasFPowerSeriesAt g p x
|
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
β’ βαΆ (y : E) in π 0, HasSum (fun n => (p n) fun x => y) (f (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
|
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
|
Mathlib.Analysis.Analytic.Basic.479_0.jQw1fRSE1vGpOll
|
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))
|
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
β’ βαΆ (y : E) in π x, HasSum (fun n => (p n) fun x_1 => y - x) (f 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
|
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
|
Mathlib.Analysis.Analytic.Basic.490_0.jQw1fRSE1vGpOll
|
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)
|
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 0 x r
β’ βαΆ (z : E) in π x, f 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
|
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 0 := by
|
Mathlib.Analysis.Analytic.Basic.501_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.eventually_eq_zero
(hf : HasFPowerSeriesOnBall f (0 : FormalMultilinearSeries π E F) x r) :
βαΆ z in π x, f z = 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
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
r r' : ββ₯0β
c : F
e : E
β’ HasFPowerSeriesOnBall (fun x => c) (constFormalMultilinearSeries π E c) e β€
|
/-
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 => _β©
|
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
|
Mathlib.Analysis.Analytic.Basic.513_0.jQw1fRSE1vGpOll
|
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€
|
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β
c : F
e : E
β’ β€ β€ FormalMultilinearSeries.radius (constFormalMultilinearSeries π E c)
|
/-
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
|
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€ := by
refine' β¨by
|
Mathlib.Analysis.Analytic.Basic.513_0.jQw1fRSE1vGpOll
|
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€
|
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β
c : F
e yβ : E
xβ : yβ β EMetric.ball 0 β€
n : β
hn : n β 0
β’ ((constFormalMultilinearSeries π E c 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]
|
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 => _β©
|
Mathlib.Analysis.Analytic.Basic.513_0.jQw1fRSE1vGpOll
|
theorem hasFPowerSeriesOnBall_const {c : F} {e : E} :
HasFPowerSeriesOnBall (fun _ => c) (constFormalMultilinearSeries π E c) e β€
|
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 pf x
hg : HasFPowerSeriesAt g pg x
β’ HasFPowerSeriesAt (f + g) (pf + pg) 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β©
|
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x := by
|
Mathlib.Analysis.Analytic.Basic.539_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x
|
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' : ββ₯0β
hf : HasFPowerSeriesAt f pf x
hg : HasFPowerSeriesAt g pg x
r : ββ₯0β
hr : HasFPowerSeriesOnBall f pf x r β§ HasFPowerSeriesOnBall g pg x r
β’ HasFPowerSeriesAt (f + g) (pf + pg) 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β©
|
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β©
|
Mathlib.Analysis.Analytic.Basic.539_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesAt.add (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f + g) (pf + pg) x
|
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 pf x r
β’ r β€ FormalMultilinearSeries.radius (-pf)
|
/-
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]
|
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
|
Mathlib.Analysis.Analytic.Basic.558_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x 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 pf x r
β’ r β€ FormalMultilinearSeries.radius pf
|
/-
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
|
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x r :=
{ r_le := by
rw [pf.radius_neg]
|
Mathlib.Analysis.Analytic.Basic.558_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.neg (hf : HasFPowerSeriesOnBall f pf x r) :
HasFPowerSeriesOnBall (-f) (-pf) x 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 pf x r
hg : HasFPowerSeriesOnBall g pg x r
β’ HasFPowerSeriesOnBall (f - g) (pf - pg) 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
|
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x r := by
|
Mathlib.Analysis.Analytic.Basic.577_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.sub (hf : HasFPowerSeriesOnBall f pf x r)
(hg : HasFPowerSeriesOnBall g pg x r) : HasFPowerSeriesOnBall (f - g) (pf - pg) x 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 : HasFPowerSeriesAt f pf x
hg : HasFPowerSeriesAt g pg x
β’ HasFPowerSeriesAt (f - g) (pf - pg) 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
|
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x := by
|
Mathlib.Analysis.Analytic.Basic.582_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesAt.sub (hf : HasFPowerSeriesAt f pf x) (hg : HasFPowerSeriesAt g pg x) :
HasFPowerSeriesAt (f - g) (pf - pg) x
|
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 : AnalyticAt π f x
hg : AnalyticAt π g x
β’ AnalyticAt π (f - g) 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
|
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x := by
|
Mathlib.Analysis.Analytic.Basic.587_0.jQw1fRSE1vGpOll
|
theorem AnalyticAt.sub (hf : AnalyticAt π f x) (hg : AnalyticAt π g x) :
AnalyticAt π (f - g) x
|
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 pf x r
v : Fin 0 β E
β’ (pf 0) v = f 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 _ _
|
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x := by
|
Mathlib.Analysis.Analytic.Basic.621_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x
|
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 pf x r
v : Fin 0 β E
v_eq : v = fun i => 0
β’ (pf 0) v = f 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]
|
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 _ _
|
Mathlib.Analysis.Analytic.Basic.621_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x
|
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 pf x r
v : Fin 0 β E
v_eq : v = fun i => 0
β’ 0 β 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]
|
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
|
Mathlib.Analysis.Analytic.Basic.621_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x
|
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 pf x r
v : Fin 0 β E
v_eq : v = fun i => 0
zero_mem : 0 β EMetric.ball 0 r
β’ (pf 0) v = f 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
|
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]
|
Mathlib.Analysis.Analytic.Basic.621_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x
|
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 pf x r
v : Fin 0 β E
v_eq : v = fun i => 0
zero_mem : 0 β EMetric.ball 0 r
β’ β (i : β), i β 0 β ((pf i) fun j => 0) = 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
|
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
|
Mathlib.Analysis.Analytic.Basic.621_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x
|
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 pf x r
v : Fin 0 β E
v_eq : v = fun i => 0
zero_mem : 0 β EMetric.ball 0 r
i : β
hi : i β 0
β’ ((pf i) fun j => 0) = 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
|
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
|
Mathlib.Analysis.Analytic.Basic.621_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x
|
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 pf x r
v : Fin 0 β E
v_eq : v = fun i => 0
zero_mem : 0 β EMetric.ball 0 r
i : β
hi : i β 0
this : 0 < i
β’ ((pf i) fun j => 0) = 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
|
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
|
Mathlib.Analysis.Analytic.Basic.621_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x
|
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 pf x r
v : Fin 0 β E
v_eq : v = fun i => 0
zero_mem : 0 β EMetric.ball 0 r
this : β (i : β), i β 0 β ((pf i) fun j => 0) = 0
β’ (pf 0) v = f 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)
|
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
|
Mathlib.Analysis.Analytic.Basic.621_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x
|
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 pf x r
v : Fin 0 β E
v_eq : v = fun i => 0
zero_mem : 0 β EMetric.ball 0 r
this : β (i : β), i β 0 β ((pf i) fun j => 0) = 0
A : f (x + 0) = (pf 0) fun x => 0
β’ (pf 0) v = f 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
|
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)
|
Mathlib.Analysis.Analytic.Basic.621_0.jQw1fRSE1vGpOll
|
theorem HasFPowerSeriesOnBall.coeff_zero (hf : HasFPowerSeriesOnBall f pf x r) (v : Fin 0 β E) :
pf 0 v = f x
|
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β
g : F βL[π] G
h : HasFPowerSeriesOnBall f p x r
yβ : E
hy : yβ β EMetric.ball 0 r
β’ HasSum (fun n => (compFormalMultilinearSeries g p n) fun x => yβ) ((βg β f) (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)
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.639_0.jQw1fRSE1vGpOll
|
/-- 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
|
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β
s : Set E
g : F βL[π] G
h : AnalyticOn π f s
β’ AnalyticOn π (βg β f) s
|
/-
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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.652_0.jQw1fRSE1vGpOll
|
/-- 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
|
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β
s : Set E
g : F βL[π] G
h : AnalyticOn π f s
x : E
hx : x β s
β’ AnalyticAt π (βg β f) 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β©
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.652_0.jQw1fRSE1vGpOll
|
/-- 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
|
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β
s : Set E
g : F βL[π] G
h : AnalyticOn π f s
x : E
hx : x β s
p : FormalMultilinearSeries π E F
r : ββ₯0β
hp : HasFPowerSeriesOnBall f p x r
β’ AnalyticAt π (βg β f) 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β©
|
/-- 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β©
|
Mathlib.Analysis.Analytic.Basic.652_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 * (βyβ / β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)
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
β’ β a β Ioo 0 1,
β C > 0,
β y β Metric.ball 0 βr',
β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / β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 => _β©
|
/-- 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)
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
β’ βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C / (1 - a) * (a * (βyβ / β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
|
/-- 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 => _β©
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
β’ βyβ < β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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β {x | βxβ < βr'}
n : β
β’ βyβ < β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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
β’ βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C / (1 - a) * (a * (βyβ / β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'
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
β’ βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C / (1 - a) * (a * (βyβ / β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'
|
/-- 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'
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
β’ y β 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)
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
β’ ββyββ < β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'
|
/-- 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)
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
this : y β EMetric.ball 0 r
β’ βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C / (1 - a) * (a * (βyβ / β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]
|
/-- 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'
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
this : y β EMetric.ball 0 r
β’ βFormalMultilinearSeries.partialSum p n y - f (x + y)β β€ C * (a * (βyβ / βr')) ^ n / (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)
|
/-- 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]
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
this : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
β’ βFormalMultilinearSeries.partialSum p n y - f (x + y)β β€ C * (a * (βyβ / βr')) ^ n / (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]
|
/-- 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)
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
thisβ : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
this : βFormalMultilinearSeries.partialSum p n y - f (x + y)β β€ C * (a * (βyβ / βr')) ^ n / (1 - a * (βyβ / βr'))
β’ βFormalMultilinearSeries.partialSum p n y - f (x + y)β β€ C * (a * (βyβ / βr')) ^ n / (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 _
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
thisβ : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
this : βFormalMultilinearSeries.partialSum p n y - f (x + y)β β€ C * (a * (βyβ / βr')) ^ n / (1 - a * (βyβ / βr'))
β’ C * (a * (βyβ / βr')) ^ n / (1 - a * (βyβ / βr')) β€ C * (a * (βyβ / βr')) ^ n / (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
|
/-- 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 _
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
thisβΒΉ : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
thisβ : βFormalMultilinearSeries.partialSum p n y - f (x + y)β β€ C * (a * (βyβ / βr')) ^ n / (1 - a * (βyβ / βr'))
this : 0 < a
β’ C * (a * (βyβ / βr')) ^ n / (1 - a * (βyβ / βr')) β€ C * (a * (βyβ / βr')) ^ n / (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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
Mathlib_Analysis_Analytic_Basic
|
case hc
π : 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 : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
thisβΒΉ : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
thisβ : βFormalMultilinearSeries.partialSum p n y - f (x + y)β β€ C * (a * (βyβ / βr')) ^ n / (1 - a * (βyβ / βr'))
this : 0 < a
β’ 0 < 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]
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
this : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
β’ βFormalMultilinearSeries.partialSum p n y - f (x + y)β β€ C * (a * (βyβ / βr')) ^ n / (1 - a * (βyβ / β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)
|
/-- 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]
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
this : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
β’ β (n : β), β(p n) fun x => yβ β€ C * (a * (βyβ / β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
|
/-- 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)
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
nβ : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
this : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
n : β
β’ β(p n) fun x => yβ β€ C * (a * (βyβ / β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]
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
nβ : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
this : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
n : β
β’ βp nβ * β _i : Fin n, βyβ = βp nβ * βr' ^ n * (βyβ / β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]
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
nβ : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
this : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
n : β
β’ βp nβ * βr' ^ n * (βyβ / βr') ^ n β€ C * a ^ n * (βyβ / β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 ?_ * _
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 r'β : ββ₯0β
r' : ββ₯0
hf : HasFPowerSeriesOnBall f p x r
h : βr' < r
a : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
nβ : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
this : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
n : β
β’ βp nβ * βr' ^ n β€ C * a ^ 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
|
/-- 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 ?_ * _;
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp : β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
y : E
hy : y β Metric.ball 0 βr'
nβ : β
yr' : βyβ < βr'
hr'0 : 0 < βr'
this : y β EMetric.ball 0 r
ya : a * (βyβ / βr') β€ a
n : β
β’ C * a ^ n * (βyβ / βr') ^ n β€ C * (a * (βyβ / β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]
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.661_0.jQw1fRSE1vGpOll
|
/-- 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
|
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
|
/-
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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.698_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
β’ β a β Ioo 0 1,
β C > 0, β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * a ^ 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 _β©
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.698_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
β’ C * (a * (βyβ / βr')) ^ n β€ C * a ^ 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
|
/-- 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 _β©
|
Mathlib.Analysis.Analytic.Basic.698_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
ha : a β Ioo 0 1
C : β
hC : C > 0
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
β’ βyβ < β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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.698_0.jQw1fRSE1vGpOll
|
/-- 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
|
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 : β
hC : C > 0
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
β’ C * (a * (βyβ / βr')) ^ n β€ C * a ^ 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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.698_0.jQw1fRSE1vGpOll
|
/-- 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
|
Mathlib_Analysis_Analytic_Basic
|
case intro.intro.intro.intro.h.ha
π : 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 : β
hC : C > 0
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
β’ 0 β€ a * (βyβ / βr')
case intro.intro.intro.intro.h.hab
π : 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 : β
hC : C > 0
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
y : E
hy : y β Metric.ball 0 βr'
n : β
yr' : βyβ < βr'
β’ a * (βyβ / βr') β€ 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)]
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.698_0.jQw1fRSE1vGpOll
|
/-- 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
|
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
n : β
β’ (fun y => f (x + y) - FormalMultilinearSeries.partialSum p n y) =O[π 0] fun y => βyβ ^ 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β©
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.714_0.jQw1fRSE1vGpOll
|
/-- 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
|
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' : ββ₯0β
n : β
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
β’ (fun y => f (x + y) - FormalMultilinearSeries.partialSum p n y) =O[π 0] fun y => βyβ ^ 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β©
|
/-- 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β©
|
Mathlib.Analysis.Analytic.Basic.714_0.jQw1fRSE1vGpOll
|
/-- 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
|
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'β : ββ₯0β
n : β
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
r'0 : 0 < βr'
h : βr' < r
β’ (fun y => f (x + y) - FormalMultilinearSeries.partialSum p n y) =O[π 0] fun y => βyβ ^ 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
|
/-- 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β©
|
Mathlib.Analysis.Analytic.Basic.714_0.jQw1fRSE1vGpOll
|
/-- 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
|
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
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
rβ r'β : ββ₯0β
n : β
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
r'0 : 0 < βr'
h : βr' < r
a C : β
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
β’ (fun y => f (x + y) - FormalMultilinearSeries.partialSum p n y) =O[π 0] fun y => βyβ ^ 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, _β©
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.714_0.jQw1fRSE1vGpOll
|
/-- 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
|
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
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
rβ r'β : ββ₯0β
n : β
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
r'0 : 0 < βr'
h : βr' < r
a C : β
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
β’ βαΆ (x_1 : E) in π 0, βf (x + x_1) - FormalMultilinearSeries.partialSum p n x_1β β€ C * (a / βr') ^ n * ββx_1β ^ 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' : β)
|
/-- 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, _β©
|
Mathlib.Analysis.Analytic.Basic.714_0.jQw1fRSE1vGpOll
|
/-- 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
|
Mathlib_Analysis_Analytic_Basic
|
case r'0
π : 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β
n : β
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
r'0 : 0 < βr'
h : βr' < r
a C : β
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
β’ 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
|
/-- 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' : β); Β·
|
Mathlib.Analysis.Analytic.Basic.714_0.jQw1fRSE1vGpOll
|
/-- 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
|
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
f g : E β F
p pf pg : FormalMultilinearSeries π E F
x : E
rβ r'β : ββ₯0β
n : β
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
h : βr' < r
a C : β
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
r'0 : 0 < βr'
β’ βαΆ (x_1 : E) in π 0, βf (x + x_1) - FormalMultilinearSeries.partialSum p n x_1β β€ C * (a / βr') ^ n * ββx_1β ^ 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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.714_0.jQw1fRSE1vGpOll
|
/-- 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
|
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β r'β : ββ₯0β
n : β
r : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
r' : ββ₯0
h : βr' < r
a C : β
hp :
β y β Metric.ball 0 βr', β (n : β), βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a * (βyβ / βr')) ^ n
r'0 : 0 < βr'
y : E
hy : y β Metric.ball 0 βr'
β’ βf (x + y) - FormalMultilinearSeries.partialSum p n yβ β€ C * (a / βr') ^ n * ββyβ ^ 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
|
/-- 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
|
Mathlib.Analysis.Analytic.Basic.714_0.jQw1fRSE1vGpOll
|
/-- 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
|
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
β’ (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
|
/-- 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
|
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
π : 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
β’ (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)
|
/-- 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
|
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.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 : ββ₯0β
hf : HasFPowerSeriesOnBall f p x r
hr : β0 < r
β’ (fun y => f y.1 - f y.2 - (p 1) fun x => y.1 - y.2) =O[π (EMetric.ball (x, x) β0)] 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]
|
/-- 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)
Β·
|
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
π : 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'
β’ (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
|
/-- 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]
|
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 β Ioo 0 1, β C > 0, β (n : β), βp nβ * βr' ^ n β€ C * a ^ n
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β * βr' ^ n β€ C * a ^ n
β’ (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)
|
/-- 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
|
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β * βr' ^ n β€ C * a ^ n
β’ (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
|
/-- 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)
|
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
β’ (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))
|
/-- 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
|
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))
β’ (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
|
/-- 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))
|
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 β 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'
|
/-- 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
|
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 β 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'
|
/-- 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'
|
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 β EMetric.ball (x, x) βr'
β’ y β EMetric.ball x r ΓΛ’ 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]
|
/-- 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
|
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 β EMetric.ball (x, x) βr'
β’ y β 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'
|
/-- 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]
|
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 β EMetric.ball (x, x) βr'
hy : y β EMetric.ball x r ΓΛ’ EMetric.ball 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
|
/-- 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'
|
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 β EMetric.ball (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
β’ β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]
|
/-- 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
|
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 β EMetric.ball (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
β’ HasSum (fun n => A (n + 2)) (f y.1 - f y.2 - (p 1) fun 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
|
/-- 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
|
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.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 : ββ₯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 β EMetric.ball (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
β’ (f y.1 - f y.2 - (p 1) fun x => y.1 - y.2) =
f y.1 - f y.2 - β i in Finset.range 2, (((p i) fun x_1 => y.1 - x) - (p i) fun x_1 => y.2 - 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]
|
/-- 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
|
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 β EMetric.ball (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)
β’ β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'
|
/-- 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]
|
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)
β’ β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)
|
/-- 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'
|
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)
β’ β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]
|
/-- 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)
|
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)
n : β
β’ βA (n + 2)β β€ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * β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
|
/-- 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)`
|
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)
n : β
β’ βp (n + 2)β * β(n + 2) * βy - (x, x)β ^ (n + 1) * βy.1 - y.2β =
βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * β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)β]
|
/-- 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
|
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)
n : β
β’ βp (n + 2)β * β(n + 2) * (βy - (x, x)β * βy - (x, x)β ^ n) * βy.1 - y.2β =
βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * β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
|
/-- 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)β]
|
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)
n : β
β’ βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) β€
C * a ^ (n + 2) / βr' ^ (n + 2) * βr' ^ n * (β(n + 2) * β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
|
/-- 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
|
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)
n : β
this : 0 < a
β’ βp (n + 2)β * βy - (x, x)β ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) β€
C * a ^ (n + 2) / βr' ^ (n + 2) * βr' ^ n * (β(n + 2) * β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
|
/-- 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
|
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.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)
n : β
this : 0 < a
β’ βp (n + 2)β β€ C * a ^ (n + 2) / βr' ^ (n + 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
|
/-- 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
Β·
|
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.hβ.hab
π : 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 : β
this : 0 < a
β’ βy - (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
|
/-- 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
Β·
|
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)
n : β
β’ C * a ^ (n + 2) / βr' ^ (n + 2) * βr' ^ n * (β(n + 2) * βy - (x, x)β * βy.1 - y.2β) = B 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]
|
/-- 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.
|
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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.