The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V17. Differential calculus in normed spaces

Mathlib.Analysis.Calculus.ContDiff.FTaylorSeries

120 declarations. Mathlib docs Β· Source

Iterated derivatives of a function

In this file, we define iteratively the n+1-th derivative of a function as the derivative of the n-th derivative. It is called iteratedFDeriv π•œ n f x where π•œ is the field, n is the number of iterations, f is the function and x is the point, and it is given as an n-multilinear map. We also define a version iteratedFDerivWithin relative to a domain. Note that, in domains, there may be several choices of possible derivative, so we make some arbitrary choice in the definition.

We also define a predicate HasFTaylorSeriesUpTo (and its localized version HasFTaylorSeriesUpToOn), saying that a sequence of multilinear maps is a sequence of derivatives of f. Contrary to iteratedFDerivWithin, it accommodates well the non-uniqueness of derivatives.

Main definitions and results

Let f : E β†’ F be a map between normed vector spaces over a nontrivially normed field π•œ.

  • HasFTaylorSeriesUpTo n f p: expresses that the formal multilinear series p is a sequence of iterated derivatives of f, up to the n-th term (where n is a natural number or ∞).

  • HasFTaylorSeriesUpToOn n f p s: same thing, but inside a set s. The notion of derivative is now taken inside s. In particular, derivatives don't have to be unique.

  • iteratedFDerivWithin π•œ n f s x is an n-th derivative of f over the field π•œ on the set s at the point x. It is a continuous multilinear map from E^n to F, defined as a derivative within s of iteratedFDerivWithin π•œ (n-1) f s if one exists, and 0 otherwise.

  • iteratedFDeriv π•œ n f x is the n-th derivative of f over the field π•œ at the point x. It is a continuous multilinear map from E^n to F, defined as a derivative of iteratedFDeriv π•œ (n-1) f if one exists, and 0 otherwise.

Side of the composition, and universe issues

With a naΓ―ve direct definition, the n-th derivative of a function belongs to the space E β†’L[π•œ] (E β†’L[π•œ] (E ... F)...))) where there are n iterations of E β†’L[π•œ]. This space may also be seen as the space of continuous multilinear functions on n copies of E with values in F, by uncurrying. This is the point of view that is usually adopted in textbooks, and that we also use. This means that the definition and the first proofs are slightly involved, as one has to keep track of the uncurrying operation. The uncurrying can be done from the left or from the right, amounting to defining the n+1-th derivative either as the derivative of the n-th derivative, or as the n-th derivative of the derivative. For proofs, it would be more convenient to use the latter approach (from the right), as it means to prove things at the n+1-th step we only need to understand well enough the derivative in E β†’L[π•œ] F (contrary to the approach from the left, where one would need to know enough on the n-th derivative to deduce things on the n+1-th derivative).

However, the definition from the right leads to a universe polymorphism problem: if we define iteratedFDeriv π•œ (n + 1) f x = iteratedFDeriv π•œ n (fderiv π•œ f) x by induction, we need to generalize over all spaces (as f and fderiv π•œ f don't take values in the same space). It is only possible to generalize over all spaces in some fixed universe in an inductive definition. For f : E β†’ F, then fderiv π•œ f is a map E β†’ (E β†’L[π•œ] F). Therefore, the definition will only work if F and E β†’L[π•œ] F are in the same universe.

This issue does not appear with the definition from the left, where one does not need to generalize over all spaces. Therefore, we use the definition from the left. This means some proofs later on become a little bit more complicated: to prove that a function is C^n, the most efficient approach is to exhibit a formula for its n-th derivative and prove it is continuous (contrary to the inductive approach where one would prove smoothness statements without giving a formula for the derivative). In the end, this approach is still satisfactory as it is good to have formulas for the iterated derivatives in various constructions.

One point where this explicit approach is particularly delicate is in the proof of smoothness of a composition: there is a formula for the n-th derivative of a composition (FaΓ  di Bruno's formula), but it is very complicated, while the inductive proof is very simple. The inductive proof would be good enough for C^n functions with n ∈ β„• βˆͺ {∞} (modulo polymorphism issues, i.e., one would need to first prove inductively the result when all spaces belong to the same universe, and then prove the general result by lifting all the spaces to a common universe). However, it would not work for C^Ο‰ functions. Therefore, we give the proof based on FaΓ  di Bruno's formula, which is more complicated but more general.

Variables management

The textbook definitions and proofs use various identifications and abuse of notations, for instance when saying that the natural space in which the derivative lives, i.e., E β†’L[π•œ] (E β†’L[π•œ] ( ... β†’L[π•œ] F)), is the same as a space of multilinear maps. When doing things formally, we need to provide explicit maps for these identifications, and chase some diagrams to see everything is compatible with the identifications. In particular, one needs to check that taking the derivative and then doing the identification, or first doing the identification and then taking the derivative, gives the same result. The key point for this is that taking the derivative commutes with continuous linear equivalences. Therefore, we need to implement all our identifications with continuous linear equivs.

Notation

We use the notation E [Γ—n]β†’L[π•œ] F for the space of continuous multilinear maps on E^n with values in F. This is the space in which the n-th derivative of a function from E to F lives.

In this file, we denote WithTop β„•βˆž with β„•βˆžΟ‰, (⊀ : β„•βˆž) : β„•βˆžΟ‰ with ∞ and ⊀ : β„•βˆžΟ‰ with Ο‰.

Functions with a Taylor series on a domain

Iterated derivative within a set

Functions with a Taylor series on the whole space

Iterated derivative

def ContDiff.Β«termβ„•βˆžΟ‰Β» E1 #

Lean.ParserDescr

The type of smoothness exponents, consisting of all natural numbers and two special terms ∞ and Ο‰. Natural numbers n correspond to n-fold continuous differentiability, ∞ to smoothness, and Ο‰ to analyticity.

def ContDiff.termω E1 #

Lean.ParserDescr

Smoothness exponent for analytic functions.

def ContDiff.«term∞» E1 #

Lean.ParserDescr

Smoothness exponent for infinitely differentiable functions.

structure HasFTaylorSeriesUpToOn E1 #

{π•œ : Type u} β†’
  [inst : NontriviallyNormedField π•œ] β†’
    {E : Type uE} β†’
      [inst_1 : NormedAddCommGroup E] β†’
        [inst_2 : NormedSpace π•œ E] β†’
          {F : Type uF} β†’
            [inst_3 : NormedAddCommGroup F] β†’
              [inst_4 : NormedSpace π•œ F] β†’ WithTop β„•βˆž β†’ (E β†’ F) β†’ (E β†’ FormalMultilinearSeries π•œ E F) β†’ Set E β†’ Prop

HasFTaylorSeriesUpToOn n f p s registers the fact that p 0 = f and p (m+1) is a derivative of p m for m < n, and is continuous for m ≀ n. This is a predicate analogous to HasFDerivWithinAt but for higher-order derivatives.

Notice that p does not sum up to f on the diagonal (FormalMultilinearSeries.sum), even if f is analytic and n = ∞: an additional 1/m! factor on the mth term is necessary for that.

ctor HasFTaylorSeriesUpToOn.mk E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {n : WithTop β„•βˆž}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F} {s : Set E},
  (βˆ€ x ∈ s, (p x 0).curry0 = f x) β†’
    (βˆ€ (m : β„•), ↑m < n β†’ βˆ€ x ∈ s, HasFDerivWithinAt (fun x ↦ p x m) (p x m.succ).curryLeft s x) β†’
      (βˆ€ (m : β„•), ↑m ≀ n β†’ ContinuousOn (fun x ↦ p x m) s) β†’ HasFTaylorSeriesUpToOn n f p s

theorem HasFTaylorSeriesUpToOn.zero_eq E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {n : WithTop β„•βˆž}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F} {s : Set E},
  HasFTaylorSeriesUpToOn n f p s β†’ βˆ€ x ∈ s, (p x 0).curry0 = f x

theorem HasFTaylorSeriesUpToOn.fderivWithin E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {n : WithTop β„•βˆž}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F} {s : Set E},
  HasFTaylorSeriesUpToOn n f p s β†’
    βˆ€ (m : β„•), ↑m < n β†’ βˆ€ x ∈ s, HasFDerivWithinAt (fun x ↦ p x m) (p x m.succ).curryLeft s x

theorem HasFTaylorSeriesUpToOn.cont E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {n : WithTop β„•βˆž}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F} {s : Set E},
  HasFTaylorSeriesUpToOn n f p s β†’ βˆ€ (m : β„•), ↑m ≀ n β†’ ContinuousOn (fun x ↦ p x m) s

theorem HasFTaylorSeriesUpToOn.zero_eq' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’ βˆ€ {x : E}, x ∈ s β†’ p x 0 = (continuousMultilinearCurryFin0 π•œ E F).symm (f x)

theorem hasFTaylorSeriesUpToOn_empty E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F}, HasFTaylorSeriesUpToOn n f p βˆ…

theorem HasFTaylorSeriesUpToOn.congr E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f f₁ : E β†’ F} {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’ (βˆ€ x ∈ s, f₁ x = f x) β†’ HasFTaylorSeriesUpToOn n f₁ p s

If two functions coincide on a set s, then a Taylor series for the first one is as well a Taylor series for the second one.

theorem HasFTaylorSeriesUpToOn.congr_series E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {n : WithTop β„•βˆž} {p q : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’
    (βˆ€ (m : β„•), ↑m ≀ n β†’ Set.EqOn (fun x ↦ p x m) (fun x ↦ q x m) s) β†’ HasFTaylorSeriesUpToOn n f q s

theorem HasFTaylorSeriesUpToOn.mono E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’ βˆ€ {t : Set E}, t βŠ† s β†’ HasFTaylorSeriesUpToOn n f p t

theorem HasFTaylorSeriesUpToOn.of_le E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {m n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’ m ≀ n β†’ HasFTaylorSeriesUpToOn m f p s

theorem HasFTaylorSeriesUpToOn.continuousOn E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’ ContinuousOn f s

theorem hasFTaylorSeriesUpToOn_zero_iff E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn 0 f p s ↔ ContinuousOn f s ∧ βˆ€ x ∈ s, (p x 0).curry0 = f x

theorem hasFTaylorSeriesUpToOn_top_iff_add E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {N : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  β†‘βŠ€ ≀ N β†’ βˆ€ (k : β„•), HasFTaylorSeriesUpToOn N f p s ↔ βˆ€ (n : β„•), HasFTaylorSeriesUpToOn (↑(n + k)) f p s

theorem hasFTaylorSeriesUpToOn_top_iff E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {N : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  β†‘βŠ€ ≀ N β†’ (HasFTaylorSeriesUpToOn N f p s ↔ βˆ€ (n : β„•), HasFTaylorSeriesUpToOn (↑n) f p s)

theorem hasFTaylorSeriesUpToOn_top_iff' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {N : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  β†‘βŠ€ ≀ N β†’
    (HasFTaylorSeriesUpToOn N f p s ↔
      (βˆ€ x ∈ s, (p x 0).curry0 = f x) ∧
        βˆ€ (m : β„•), βˆ€ x ∈ s, HasFDerivWithinAt (fun y ↦ p y m) (p x m.succ).curryLeft s x)

In the case that n = ∞ we don't need the continuity assumption in HasFTaylorSeriesUpToOn.

theorem HasFTaylorSeriesUpToOn.hasFDerivWithinAt E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’
    n β‰  0 β†’ x ∈ s β†’ HasFDerivWithinAt f ((continuousMultilinearCurryFin1 π•œ E F) (p x 1)) s x

If a function has a Taylor series at order at least 1, then the term of order 1 of this series is a derivative of f.

theorem HasFTaylorSeriesUpToOn.differentiableOn E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’ n β‰  0 β†’ DifferentiableOn π•œ f s

theorem HasFTaylorSeriesUpToOn.hasFDerivAt E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’ n β‰  0 β†’ s ∈ nhds x β†’ HasFDerivAt f ((continuousMultilinearCurryFin1 π•œ E F) (p x 1)) x

If a function has a Taylor series at order at least 1 on a neighborhood of x, then the term of order 1 of this series is a derivative of f at x.

theorem HasFTaylorSeriesUpToOn.eventually_hasFDerivAt E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’
    n β‰  0 β†’ s ∈ nhds x β†’ βˆ€αΆ  (y : E) in nhds x, HasFDerivAt f ((continuousMultilinearCurryFin1 π•œ E F) (p y 1)) y

If a function has a Taylor series at order at least 1 on a neighborhood of x, then in a neighborhood of x, the term of order 1 of this series is a derivative of f.

theorem HasFTaylorSeriesUpToOn.differentiableAt E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p s β†’ n β‰  0 β†’ s ∈ nhds x β†’ DifferentiableAt π•œ f x

If a function has a Taylor series at order at least 1 on a neighborhood of x, then it is differentiable at x.

theorem hasFTaylorSeriesUpToOn_succ_iff_left E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F} {n : β„•},
  HasFTaylorSeriesUpToOn (↑n + 1) f p s ↔
    HasFTaylorSeriesUpToOn (↑n) f p s ∧
      (βˆ€ x ∈ s, HasFDerivWithinAt (fun y ↦ p y n) (p x n.succ).curryLeft s x) ∧ ContinuousOn (fun x ↦ p x (n + 1)) s

p is a Taylor series of f up to n+1 if and only if p is a Taylor series up to n, and p (n + 1) is a derivative of p n.

theorem HasFTaylorSeriesUpToOn.shift_of_succ E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F} {n : β„•},
  HasFTaylorSeriesUpToOn (↑(n + 1)) f p s β†’
    HasFTaylorSeriesUpToOn (↑n) (fun x ↦ (continuousMultilinearCurryFin1 π•œ E F) (p x 1)) (fun x ↦ (p x).shift) s

theorem hasFTaylorSeriesUpToOn_succ_nat_iff_right E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F} {n : β„•},
  HasFTaylorSeriesUpToOn (↑(n + 1)) f p s ↔
    (βˆ€ x ∈ s, (p x 0).curry0 = f x) ∧
      (βˆ€ x ∈ s, HasFDerivWithinAt (fun y ↦ p y 0) (p x 1).curryLeft s x) ∧
        HasFTaylorSeriesUpToOn (↑n) (fun x ↦ (continuousMultilinearCurryFin1 π•œ E F) (p x 1)) (fun x ↦ (p x).shift) s

p is a Taylor series of f up to n+1 if and only if p.shift is a Taylor series up to n for p 1, which is a derivative of f. Version for n : β„•.

theorem hasFTaylorSeriesUpToOn_top_iff_right E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {N : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  β†‘βŠ€ ≀ N β†’
    (HasFTaylorSeriesUpToOn N f p s ↔
      (βˆ€ x ∈ s, (p x 0).curry0 = f x) ∧
        (βˆ€ x ∈ s, HasFDerivWithinAt (fun y ↦ p y 0) (p x 1).curryLeft s x) ∧
          HasFTaylorSeriesUpToOn N (fun x ↦ (continuousMultilinearCurryFin1 π•œ E F) (p x 1)) (fun x ↦ (p x).shift) s)

p is a Taylor series of f up to ⊀ if and only if p.shift is a Taylor series up to ⊀ for p 1, which is a derivative of f.

theorem hasFTaylorSeriesUpToOn_succ_iff_right E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn (n + 1) f p s ↔
    (βˆ€ x ∈ s, (p x 0).curry0 = f x) ∧
      (βˆ€ x ∈ s, HasFDerivWithinAt (fun y ↦ p y 0) (p x 1).curryLeft s x) ∧
        HasFTaylorSeriesUpToOn n (fun x ↦ (continuousMultilinearCurryFin1 π•œ E F) (p x 1)) (fun x ↦ (p x).shift) s

p is a Taylor series of f up to n+1 if and only if p.shift is a Taylor series up to n for p 1, which is a derivative of f. Version for n : β„•βˆžΟ‰.

def iteratedFDerivWithin E1 #

(π•œ : Type u) β†’
  [inst : NontriviallyNormedField π•œ] β†’
    {E : Type uE} β†’
      [inst_1 : NormedAddCommGroup E] β†’
        [inst_2 : NormedSpace π•œ E] β†’
          {F : Type uF} β†’
            [inst_3 : NormedAddCommGroup F] β†’ [inst_4 : NormedSpace π•œ F] β†’ (n : β„•) β†’ (E β†’ F) β†’ Set E β†’ E β†’ E [Γ—n]β†’L[π•œ] F

The n-th derivative of a function along a set, defined inductively by saying that the n+1-th derivative of f is the derivative of the n-th derivative of f along this set, together with an uncurrying step to see it as a multilinear map in n+1 variables.

def ftaylorSeriesWithin E1 #

(π•œ : Type u) β†’
  [inst : NontriviallyNormedField π•œ] β†’
    {E : Type uE} β†’
      [inst_1 : NormedAddCommGroup E] β†’
        [inst_2 : NormedSpace π•œ E] β†’
          {F : Type uF} β†’
            [inst_3 : NormedAddCommGroup F] β†’
              [inst_4 : NormedSpace π•œ F] β†’ (E β†’ F) β†’ Set E β†’ E β†’ FormalMultilinearSeries π•œ E F

Formal Taylor series associated to a function within a set.

theorem iteratedFDerivWithin_zero_apply E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} (m : Fin 0 β†’ E), (iteratedFDerivWithin π•œ 0 f s x) m = f x

theorem iteratedFDerivWithin_zero_eq_comp E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F}, iteratedFDerivWithin π•œ 0 f s = ⇑(continuousMultilinearCurryFin0 π•œ E F).symm ∘ f

theorem dist_iteratedFDerivWithin_zero E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] (f : E β†’ F)
  (s : Set E) (x : E) (g : E β†’ F) (t : Set E) (y : E),
  dist (iteratedFDerivWithin π•œ 0 f s x) (iteratedFDerivWithin π•œ 0 g t y) = dist (f x) (g y)

theorem norm_iteratedFDerivWithin_zero E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E}, β€–iteratedFDerivWithin π•œ 0 f s xβ€– = β€–f xβ€–

theorem iteratedFDerivWithin_succ_apply_left E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} {n : β„•} (m : Fin (n + 1) β†’ E),
  (iteratedFDerivWithin π•œ (n + 1) f s x) m = ((fderivWithin π•œ (iteratedFDerivWithin π•œ n f s) s x) (m 0)) (Fin.tail m)

theorem iteratedFDerivWithin_succ_eq_comp_left E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {n : β„•},
  iteratedFDerivWithin π•œ (n + 1) f s =
    ⇑(continuousMultilinearCurryLeftEquiv π•œ (fun x ↦ E) F).symm ∘ fderivWithin π•œ (iteratedFDerivWithin π•œ n f s) s

Writing explicitly the n+1-th derivative as the composition of a currying linear equiv, and the derivative of the n-th derivative.

theorem fderivWithin_iteratedFDerivWithin E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {s : Set E} {n : β„•},
  fderivWithin π•œ (iteratedFDerivWithin π•œ n f s) s =
    ⇑(continuousMultilinearCurryLeftEquiv π•œ (fun x ↦ E) F) ∘ iteratedFDerivWithin π•œ (n + 1) f s

theorem norm_fderivWithin_iteratedFDerivWithin E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} {n : β„•},
  β€–fderivWithin π•œ (iteratedFDerivWithin π•œ n f s) s xβ€– = β€–iteratedFDerivWithin π•œ (n + 1) f s xβ€–

theorem dist_iteratedFDerivWithin_one E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s t : Set E}
  {x : E} (f g : E β†’ F) {y : E},
  UniqueDiffWithinAt π•œ s x β†’
    UniqueDiffWithinAt π•œ t y β†’
      dist (iteratedFDerivWithin π•œ 1 f s x) (iteratedFDerivWithin π•œ 1 g t y) =
        dist (fderivWithin π•œ f s x) (fderivWithin π•œ g t y)

theorem norm_iteratedFDerivWithin_one E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {x : E} (f : E β†’ F), UniqueDiffWithinAt π•œ s x β†’ β€–iteratedFDerivWithin π•œ 1 f s xβ€– = β€–fderivWithin π•œ f s xβ€–

theorem iteratedFDerivWithin_succ_apply_right E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} {n : β„•},
  UniqueDiffOn π•œ s β†’
    x ∈ s β†’
      βˆ€ (m : Fin (n + 1) β†’ E),
        (iteratedFDerivWithin π•œ (n + 1) f s x) m =
          ((iteratedFDerivWithin π•œ n (fun y ↦ fderivWithin π•œ f s y) s x) (Fin.init m)) (m (Fin.last n))

theorem iteratedFDerivWithin_succ_eq_comp_right E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} {n : β„•},
  UniqueDiffOn π•œ s β†’
    x ∈ s β†’
      iteratedFDerivWithin π•œ (n + 1) f s x =
        (⇑(continuousMultilinearCurryRightEquiv' π•œ n E F).symm ∘
            iteratedFDerivWithin π•œ n (fun y ↦ fderivWithin π•œ f s y) s)
          x

Writing explicitly the n+1-th derivative as the composition of a currying linear equiv, and the n-th derivative of the derivative.

theorem norm_iteratedFDerivWithin_fderivWithin E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} {n : β„•},
  UniqueDiffOn π•œ s β†’
    x ∈ s β†’ β€–iteratedFDerivWithin π•œ n (fderivWithin π•œ f s) s xβ€– = β€–iteratedFDerivWithin π•œ (n + 1) f s xβ€–

theorem iteratedFDerivWithin_one_apply E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E},
  UniqueDiffWithinAt π•œ s x β†’ βˆ€ (m : Fin 1 β†’ E), (iteratedFDerivWithin π•œ 1 f s x) m = (fderivWithin π•œ f s x) (m 0)

theorem iteratedFDerivWithin_two_apply E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  (f : E β†’ F) {z : E},
  UniqueDiffOn π•œ s β†’
    z ∈ s β†’
      βˆ€ (m : Fin 2 β†’ E), (iteratedFDerivWithin π•œ 2 f s z) m = ((fderivWithin π•œ (fderivWithin π•œ f s) s z) (m 0)) (m 1)

On a set of unique differentiability, the second derivative is obtained by taking the derivative of the derivative.

theorem iteratedFDerivWithin_two_apply' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  (f : E β†’ F) {z : E},
  UniqueDiffOn π•œ s β†’
    z ∈ s β†’ βˆ€ (v w : E), (iteratedFDerivWithin π•œ 2 f s z) ![v, w] = ((fderivWithin π•œ (fderivWithin π•œ f s) s z) v) w

On a set of unique differentiability, the second derivative is obtained by taking the derivative of the derivative.

theorem Filter.EventuallyEq.iteratedFDerivWithin' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s t : Set E}
  {f f₁ : E β†’ F} {x : E},
  f₁ =αΆ [nhdsWithin x s] f β†’
    t βŠ† s β†’ βˆ€ (n : β„•), iteratedFDerivWithin π•œ n f₁ t =αΆ [nhdsWithin x s] iteratedFDerivWithin π•œ n f t

theorem Filter.EventuallyEq.iteratedFDerivWithin E1 #

βˆ€ (π•œ : Type u) [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f f₁ : E β†’ F} {x : E},
  f₁ =αΆ [nhdsWithin x s] f β†’ βˆ€ (n : β„•), iteratedFDerivWithin π•œ n f₁ s =αΆ [nhdsWithin x s] iteratedFDerivWithin π•œ n f s

If two functions agree in a neighborhood within s, then so do their iterated derivatives.

theorem Filter.EventuallyEq.ftaylorSeriesWithin E1 #

βˆ€ (π•œ : Type u) [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f f₁ : E β†’ F} {x : E},
  f₁ =αΆ [nhdsWithin x s] f β†’ ftaylorSeriesWithin π•œ f₁ s =αΆ [nhdsWithin x s] ftaylorSeriesWithin π•œ f s

If two functions agree in a neighborhood within s, then so do their Taylor series.

theorem Filter.EventuallyEq.iteratedFDerivWithin_eq E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f f₁ : E β†’ F} {x : E},
  f₁ =αΆ [nhdsWithin x s] f β†’ f₁ x = f x β†’ βˆ€ (n : β„•), iteratedFDerivWithin π•œ n f₁ s x = iteratedFDerivWithin π•œ n f s x

If two functions coincide in a neighborhood of x within a set s and at x, then their iterated differentials within this set at x coincide.

theorem iteratedFDerivWithin_congr E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f f₁ : E β†’ F} {x : E},
  Set.EqOn f₁ f s β†’ x ∈ s β†’ βˆ€ (n : β„•), iteratedFDerivWithin π•œ n f₁ s x = iteratedFDerivWithin π•œ n f s x

If two functions coincide on a set s, then their iterated differentials within this set coincide. See also Filter.EventuallyEq.iteratedFDerivWithin_eq and Filter.EventuallyEq.iteratedFDerivWithin.

theorem Set.EqOn.iteratedFDerivWithin E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f f₁ : E β†’ F}, Set.EqOn f₁ f s β†’ βˆ€ (n : β„•), Set.EqOn (iteratedFDerivWithin π•œ n f₁ s) (iteratedFDerivWithin π•œ n f s) s

If two functions coincide on a set s, then their iterated differentials within this set coincide. See also Filter.EventuallyEq.iteratedFDerivWithin_eq and Filter.EventuallyEq.iteratedFDerivWithin.

theorem iteratedFDerivWithin_eventually_congr_set' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s t : Set E}
  {f : E β†’ F} {x : E} (y : E),
  s =αΆ [nhdsWithin x {y}ᢜ] t β†’ βˆ€ (n : β„•), iteratedFDerivWithin π•œ n f s =αΆ [nhds x] iteratedFDerivWithin π•œ n f t

theorem iteratedFDerivWithin_eventually_congr_set E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s t : Set E}
  {f : E β†’ F} {x : E}, s =αΆ [nhds x] t β†’ βˆ€ (n : β„•), iteratedFDerivWithin π•œ n f s =αΆ [nhds x] iteratedFDerivWithin π•œ n f t

theorem iteratedFDerivWithin_congr_set' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s t : Set E}
  {f : E β†’ F} {x y : E},
  s =αΆ [nhdsWithin x {y}ᢜ] t β†’ βˆ€ (n : β„•), iteratedFDerivWithin π•œ n f s x = iteratedFDerivWithin π•œ n f t x

If two sets coincide in a punctured neighborhood of x, then the corresponding iterated derivatives are equal.

Note that we also allow to puncture the neighborhood of x at y. If y β‰  x, then this is a no-op.

theorem iteratedFDerivWithin_insert E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} {n : β„•} {y : E}, iteratedFDerivWithin π•œ n f (insert x s) y = iteratedFDerivWithin π•œ n f s y

theorem iteratedFDerivWithin_congr_set E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s t : Set E}
  {f : E β†’ F} {x : E}, s =αΆ [nhds x] t β†’ βˆ€ (n : β„•), iteratedFDerivWithin π•œ n f s x = iteratedFDerivWithin π•œ n f t x

theorem ftaylorSeriesWithin_insert E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E}, ftaylorSeriesWithin π•œ f (insert x s) = ftaylorSeriesWithin π•œ f s

theorem iteratedFDerivWithin_inter' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s u : Set E}
  {f : E β†’ F} {x : E} {n : β„•},
  u ∈ nhdsWithin x s β†’ iteratedFDerivWithin π•œ n f (s ∩ u) x = iteratedFDerivWithin π•œ n f s x

The iterated differential within a set s at a point x is not modified if one intersects s with a neighborhood of x within s.

theorem iteratedFDerivWithin_inter E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s u : Set E}
  {f : E β†’ F} {x : E} {n : β„•}, u ∈ nhds x β†’ iteratedFDerivWithin π•œ n f (s ∩ u) x = iteratedFDerivWithin π•œ n f s x

The iterated differential within a set s at a point x is not modified if one intersects s with a neighborhood of x.

theorem iteratedFDerivWithin_inter_open E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s u : Set E}
  {f : E β†’ F} {x : E} {n : β„•}, IsOpen u β†’ x ∈ u β†’ iteratedFDerivWithin π•œ n f (s ∩ u) x = iteratedFDerivWithin π•œ n f s x

The iterated differential within a set s at a point x is not modified if one intersects s with an open set containing x.

theorem iteratedFDerivWithin_comp_add_left' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} (n : β„•) (a : E),
  iteratedFDerivWithin π•œ n (fun z ↦ f (a + z)) s = fun x ↦ iteratedFDerivWithin π•œ n f (a +α΅₯ s) (a + x)

The iterated derivative commutes with shifting the function by a constant on the left.

theorem iteratedFDerivWithin_comp_add_left E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} (n : β„•) (a x : E),
  iteratedFDerivWithin π•œ n (fun z ↦ f (a + z)) s x = iteratedFDerivWithin π•œ n f (a +α΅₯ s) (a + x)

The iterated derivative commutes with shifting the function by a constant on the left.

theorem iteratedFDerivWithin_comp_add_right' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} (n : β„•) (a : E),
  iteratedFDerivWithin π•œ n (fun z ↦ f (z + a)) s = fun x ↦ iteratedFDerivWithin π•œ n f (a +α΅₯ s) (x + a)

The iterated derivative commutes with shifting the function by a constant on the right.

theorem iteratedFDerivWithin_comp_add_right E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} (n : β„•) (a x : E),
  iteratedFDerivWithin π•œ n (fun z ↦ f (z + a)) s x = iteratedFDerivWithin π•œ n f (a +α΅₯ s) (x + a)

The iterated derivative commutes with shifting the function by a constant on the right.

theorem iteratedFDerivWithin_comp_sub' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} (n : β„•) (a : E),
  iteratedFDerivWithin π•œ n (fun z ↦ f (z - a)) s = fun x ↦ iteratedFDerivWithin π•œ n f (-a +α΅₯ s) (x - a)

The iterated derivative commutes with subtracting a constant.

theorem iteratedFDerivWithin_comp_sub E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} {x : E} (n : β„•) (a : E),
  iteratedFDerivWithin π•œ n (fun z ↦ f (z - a)) s x = iteratedFDerivWithin π•œ n f (-a +α΅₯ s) (x - a)

The iterated derivative commutes with subtracting a constant.

structure HasFTaylorSeriesUpTo E1 #

{π•œ : Type u} β†’
  [inst : NontriviallyNormedField π•œ] β†’
    {E : Type uE} β†’
      [inst_1 : NormedAddCommGroup E] β†’
        [inst_2 : NormedSpace π•œ E] β†’
          {F : Type uF} β†’
            [inst_3 : NormedAddCommGroup F] β†’
              [inst_4 : NormedSpace π•œ F] β†’ WithTop β„•βˆž β†’ (E β†’ F) β†’ (E β†’ FormalMultilinearSeries π•œ E F) β†’ Prop

HasFTaylorSeriesUpTo n f p registers the fact that p 0 = f and p (m+1) is a derivative of p m for m < n, and is continuous for m ≀ n. This is a predicate analogous to HasFDerivAt but for higher-order derivatives.

Notice that p does not sum up to f on the diagonal (FormalMultilinearSeries.sum), even if f is analytic and n = ∞: an addition 1/m! factor on the mth term is necessary for that.

ctor HasFTaylorSeriesUpTo.mk E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {n : WithTop β„•βˆž}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F},
  (βˆ€ (x : E), (p x 0).curry0 = f x) β†’
    (βˆ€ (m : β„•), ↑m < n β†’ βˆ€ (x : E), HasFDerivAt (fun y ↦ p y m) (p x m.succ).curryLeft x) β†’
      (βˆ€ (m : β„•), ↑m ≀ n β†’ Continuous fun x ↦ p x m) β†’ HasFTaylorSeriesUpTo n f p

theorem HasFTaylorSeriesUpTo.zero_eq E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {n : WithTop β„•βˆž}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F}, HasFTaylorSeriesUpTo n f p β†’ βˆ€ (x : E), (p x 0).curry0 = f x

theorem HasFTaylorSeriesUpTo.fderiv E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {n : WithTop β„•βˆž}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpTo n f p β†’ βˆ€ (m : β„•), ↑m < n β†’ βˆ€ (x : E), HasFDerivAt (fun y ↦ p y m) (p x m.succ).curryLeft x

theorem HasFTaylorSeriesUpTo.cont E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {n : WithTop β„•βˆž}
  {f : E β†’ F} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpTo n f p β†’ βˆ€ (m : β„•), ↑m ≀ n β†’ Continuous fun x ↦ p x m

theorem HasFTaylorSeriesUpTo.zero_eq' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpTo n f p β†’ βˆ€ (x : E), p x 0 = (continuousMultilinearCurryFin0 π•œ E F).symm (f x)

theorem HasFTaylorSeriesUpTo.fderiv_eq E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpTo n f p β†’ βˆ€ {m : β„•}, ↑m < n β†’ βˆ€ (x : E), fderiv π•œ (fun x ↦ p x m) x = (p x m.succ).curryLeft

theorem hasFTaylorSeriesUpToOn_univ_iff E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpToOn n f p Set.univ ↔ HasFTaylorSeriesUpTo n f p

theorem HasFTaylorSeriesUpTo.hasFTaylorSeriesUpToOn E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpTo n f p β†’ βˆ€ (s : Set E), HasFTaylorSeriesUpToOn n f p s

theorem HasFTaylorSeriesUpTo.of_le E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {m n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpTo n f p β†’ m ≀ n β†’ HasFTaylorSeriesUpTo m f p

theorem HasFTaylorSeriesUpTo.continuous E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F}, HasFTaylorSeriesUpTo n f p β†’ Continuous f

theorem hasFTaylorSeriesUpTo_zero_iff E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {p : E β†’ FormalMultilinearSeries π•œ E F}, HasFTaylorSeriesUpTo 0 f p ↔ Continuous f ∧ βˆ€ (x : E), (p x 0).curry0 = f x

theorem hasFTaylorSeriesUpTo_top_iff E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {N : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  β†‘βŠ€ ≀ N β†’ (HasFTaylorSeriesUpTo N f p ↔ βˆ€ (n : β„•), HasFTaylorSeriesUpTo (↑n) f p)

theorem hasFTaylorSeriesUpTo_top_iff' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {N : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  β†‘βŠ€ ≀ N β†’
    (HasFTaylorSeriesUpTo N f p ↔
      (βˆ€ (x : E), (p x 0).curry0 = f x) ∧ βˆ€ (m : β„•) (x : E), HasFDerivAt (fun y ↦ p y m) (p x m.succ).curryLeft x)

In the case that n = ∞ we don't need the continuity assumption in HasFTaylorSeriesUpTo.

theorem HasFTaylorSeriesUpTo.hasFDerivAt E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F},
  HasFTaylorSeriesUpTo n f p β†’ n β‰  0 β†’ βˆ€ (x : E), HasFDerivAt f ((continuousMultilinearCurryFin1 π•œ E F) (p x 1)) x

If a function has a Taylor series at order at least 1, then the term of order 1 of this series is a derivative of f.

theorem HasFTaylorSeriesUpTo.differentiable E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F}, HasFTaylorSeriesUpTo n f p β†’ n β‰  0 β†’ Differentiable π•œ f

theorem hasFTaylorSeriesUpTo_succ_nat_iff_right E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {p : E β†’ FormalMultilinearSeries π•œ E F} {n : β„•},
  HasFTaylorSeriesUpTo (↑(n + 1)) f p ↔
    (βˆ€ (x : E), (p x 0).curry0 = f x) ∧
      (βˆ€ (x : E), HasFDerivAt (fun y ↦ p y 0) (p x 1).curryLeft x) ∧
        HasFTaylorSeriesUpTo (↑n) (fun x ↦ (continuousMultilinearCurryFin1 π•œ E F) (p x 1)) fun x ↦ (p x).shift

p is a Taylor series of f up to n+1 if and only if p.shift is a Taylor series up to n for p 1, which is a derivative of f.

theorem HasFTaylorSeriesUpTo.tsupport_mono E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F} {k m : β„•},
  k ≀ m β†’ ↑m ≀ n β†’ HasFTaylorSeriesUpTo n f p β†’ (tsupport fun x ↦ p x m) βŠ† tsupport fun x ↦ p x k

theorem HasFTaylorSeriesUpTo.tsupport_subset E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : WithTop β„•βˆž} {p : E β†’ FormalMultilinearSeries π•œ E F} {m : β„•},
  ↑m ≀ n β†’ HasFTaylorSeriesUpTo n f p β†’ (tsupport fun x ↦ p x m) βŠ† tsupport f

def iteratedFDeriv E3 #

(π•œ : Type u) β†’
  [inst : NontriviallyNormedField π•œ] β†’
    {E : Type uE} β†’
      [inst_1 : NormedAddCommGroup E] β†’
        [inst_2 : NormedSpace π•œ E] β†’
          {F : Type uF} β†’
            [inst_3 : NormedAddCommGroup F] β†’ [inst_4 : NormedSpace π•œ F] β†’ (n : β„•) β†’ (E β†’ F) β†’ E β†’ E [Γ—n]β†’L[π•œ] F

The n-th derivative of a function, as a multilinear map, defined inductively.

def ftaylorSeries E1 #

(π•œ : Type u) β†’
  [inst : NontriviallyNormedField π•œ] β†’
    {E : Type uE} β†’
      [inst_1 : NormedAddCommGroup E] β†’
        [inst_2 : NormedSpace π•œ E] β†’
          {F : Type uF} β†’
            [inst_3 : NormedAddCommGroup F] β†’ [inst_4 : NormedSpace π•œ F] β†’ (E β†’ F) β†’ E β†’ FormalMultilinearSeries π•œ E F

Formal Taylor series associated to a function.

theorem iteratedFDeriv_zero_apply E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {x : E} (m : Fin 0 β†’ E), (iteratedFDeriv π•œ 0 f x) m = f x

theorem iteratedFDeriv_zero_eq_comp E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F},
  iteratedFDeriv π•œ 0 f = ⇑(continuousMultilinearCurryFin0 π•œ E F).symm ∘ f

theorem norm_iteratedFDeriv_zero E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {x : E}, β€–iteratedFDeriv π•œ 0 f xβ€– = β€–f xβ€–

theorem iteratedFDerivWithin_zero_eq E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F}, iteratedFDerivWithin π•œ 0 f s = iteratedFDeriv π•œ 0 f

theorem iteratedFDeriv_succ_apply_left E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {x : E} {n : β„•} (m : Fin (n + 1) β†’ E),
  (iteratedFDeriv π•œ (n + 1) f x) m = ((fderiv π•œ (iteratedFDeriv π•œ n f) x) (m 0)) (Fin.tail m)

theorem DifferentiableAt.iteratedFDeriv_succ_apply_left' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {x : E} {n : β„•} {m : Fin (n + 1) β†’ E},
  DifferentiableAt π•œ (iteratedFDeriv π•œ n f) x β†’
    (iteratedFDeriv π•œ (n + 1) f x) m = (fderiv π•œ (fun y ↦ (iteratedFDeriv π•œ n f y) (Fin.tail m)) x) (m 0)

The iterated derivative is given by the derivative of the n-1 iterated derivative.

theorem iteratedFDeriv_succ_eq_comp_left E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : β„•},
  iteratedFDeriv π•œ (n + 1) f =
    ⇑(continuousMultilinearCurryLeftEquiv π•œ (fun x ↦ E) F).symm ∘ fderiv π•œ (iteratedFDeriv π•œ n f)

Writing explicitly the n+1-th derivative as the composition of a currying linear equiv, and the derivative of the n-th derivative.

theorem fderiv_iteratedFDeriv E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : β„•},
  fderiv π•œ (iteratedFDeriv π•œ n f) = ⇑(continuousMultilinearCurryLeftEquiv π•œ (fun x ↦ E) F) ∘ iteratedFDeriv π•œ (n + 1) f

Writing explicitly the derivative of the n-th derivative as the composition of a currying linear equiv, and the n + 1-th derivative.

theorem tsupport_iteratedFDeriv_subset E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  (n : β„•), tsupport (iteratedFDeriv π•œ n f) βŠ† tsupport f

theorem support_iteratedFDeriv_subset E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  (n : β„•), Function.support (iteratedFDeriv π•œ n f) βŠ† tsupport f

theorem HasCompactSupport.iteratedFDeriv E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F},
  HasCompactSupport f β†’ βˆ€ (n : β„•), HasCompactSupport (iteratedFDeriv π•œ n f)

theorem norm_fderiv_iteratedFDeriv E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {x : E} {n : β„•}, β€–fderiv π•œ (iteratedFDeriv π•œ n f) xβ€– = β€–iteratedFDeriv π•œ (n + 1) f xβ€–

theorem iteratedFDerivWithin_univ E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {n : β„•}, iteratedFDerivWithin π•œ n f Set.univ = iteratedFDeriv π•œ n f

theorem Filter.EventuallyEq.iteratedFDeriv E1 #

βˆ€ (π•œ : Type u) [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f₁ fβ‚‚ : E β†’ F}
  {x : E}, f₁ =αΆ [nhds x] fβ‚‚ β†’ βˆ€ (n : β„•), iteratedFDeriv π•œ n f₁ =αΆ [nhds x] iteratedFDeriv π•œ n fβ‚‚

If two functions agree in a neighborhood, then so do their iterated derivatives.

theorem Filter.EventuallyEq.ftaylorSeries E1 #

βˆ€ (π•œ : Type u) [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f f₁ : E β†’ F}
  {x : E}, f₁ =αΆ [nhds x] f β†’ ftaylorSeries π•œ f₁ =αΆ [nhds x] ftaylorSeries π•œ f

If two functions agree in a neighborhood, then so do their Taylor series.

theorem iteratedFDerivWithin_of_isOpen E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {s : Set E}
  {f : E β†’ F} (n : β„•), IsOpen s β†’ Set.EqOn (iteratedFDerivWithin π•œ n f s) (iteratedFDeriv π•œ n f) s

In an open set, the iterated derivative within this set coincides with the global iterated derivative.

theorem ftaylorSeriesWithin_univ E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F},
  ftaylorSeriesWithin π•œ f Set.univ = ftaylorSeries π•œ f

theorem iteratedFDeriv_succ_apply_right E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {x : E} {n : β„•} (m : Fin (n + 1) β†’ E),
  (iteratedFDeriv π•œ (n + 1) f x) m = ((iteratedFDeriv π•œ n (fun y ↦ fderiv π•œ f y) x) (Fin.init m)) (m (Fin.last n))

theorem iteratedFDeriv_succ_eq_comp_right E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {x : E} {n : β„•},
  iteratedFDeriv π•œ (n + 1) f x =
    (⇑(continuousMultilinearCurryRightEquiv' π•œ n E F).symm ∘ iteratedFDeriv π•œ n fun y ↦ fderiv π•œ f y) x

Writing explicitly the n+1-th derivative as the composition of a currying linear equiv, and the n-th derivative of the derivative.

theorem norm_iteratedFDeriv_fderiv E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {x : E} {n : β„•}, β€–iteratedFDeriv π•œ n (fderiv π•œ f) xβ€– = β€–iteratedFDeriv π•œ (n + 1) f xβ€–

theorem iteratedFDeriv_one_apply E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  {x : E} (m : Fin 1 β†’ E), (iteratedFDeriv π•œ 1 f x) m = (fderiv π•œ f x) (m 0)

theorem norm_iteratedFDeriv_one E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {x : E}
  (f : E β†’ F), β€–iteratedFDeriv π•œ 1 f xβ€– = β€–fderiv π•œ f xβ€–

theorem iteratedFDeriv_two_apply E0 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] (f : E β†’ F)
  (z : E) (m : Fin 2 β†’ E), (iteratedFDeriv π•œ 2 f z) m = ((fderiv π•œ (fderiv π•œ f) z) (m 0)) (m 1)

theorem iteratedFDeriv_comp_add_left' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  (n : β„•) (a : E), (iteratedFDeriv π•œ n fun z ↦ f (a + z)) = fun x ↦ iteratedFDeriv π•œ n f (a + x)

The iterated derivative commutes with shifting the function by a constant on the left.

theorem iteratedFDeriv_comp_add_left E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  (n : β„•) (a x : E), iteratedFDeriv π•œ n (fun z ↦ f (a + z)) x = iteratedFDeriv π•œ n f (a + x)

The iterated derivative commutes with shifting the function by a constant on the left.

theorem iteratedFDeriv_comp_add_right' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  (n : β„•) (a : E), (iteratedFDeriv π•œ n fun z ↦ f (z + a)) = fun x ↦ iteratedFDeriv π•œ n f (x + a)

The iterated derivative commutes with shifting the function by a constant on the right.

theorem iteratedFDeriv_comp_add_right E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  (n : β„•) (a x : E), iteratedFDeriv π•œ n (fun z ↦ f (z + a)) x = iteratedFDeriv π•œ n f (x + a)

The iterated derivative commutes with shifting the function by a constant on the right.

theorem iteratedFDeriv_comp_sub' E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  (n : β„•) (a : E), (iteratedFDeriv π•œ n fun z ↦ f (z - a)) = fun x ↦ iteratedFDeriv π•œ n f (x - a)

The iterated derivative commutes with subtracting a constant.

theorem iteratedFDeriv_comp_sub E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {E : Type uE} [inst_1 : NormedAddCommGroup E]
  [inst_2 : NormedSpace π•œ E] {F : Type uF} [inst_3 : NormedAddCommGroup F] [inst_4 : NormedSpace π•œ F] {f : E β†’ F}
  (n : β„•) (a x : E), iteratedFDeriv π•œ n (fun z ↦ f (z - a)) x = iteratedFDeriv π•œ n f (x - a)

The iterated derivative commutes with subtracting a constant.

theorem iteratedFDerivWithin_comp_neg E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {F : Type uF} [inst_1 : NormedAddCommGroup F]
  [inst_2 : NormedSpace π•œ F] {f : π•œ β†’ F} {s : Set π•œ} (n : β„•) (a : π•œ),
  iteratedFDerivWithin π•œ n (fun x ↦ f (-x)) s a = (-1) ^ n β€’ iteratedFDerivWithin π•œ n f (-s) (-a)

theorem iteratedFDerivWithin_comp_const_sub E1 #

βˆ€ {π•œ : Type u} [inst : NontriviallyNormedField π•œ] {F : Type uF} [inst_1 : NormedAddCommGroup F]
  [inst_2 : NormedSpace π•œ F] {f : π•œ β†’ F} {s : Set π•œ} (n : β„•) (c : π•œ),
  iteratedFDerivWithin π•œ n (fun z ↦ f (c - z)) s = fun x ↦ (-1) ^ n β€’ iteratedFDerivWithin π•œ n f (c +α΅₯ -s) (c - x)