mathlib documentation

analysis.calculus.cont_diff_def

Higher differentiability #

A function is C^1 on a domain if it is differentiable there, and its derivative is continuous. By induction, it is C^n if it is C^{n-1} and its (n-1)-th derivative is C^1 there or, equivalently, if it is C^1 and its derivative is C^{n-1}. Finally, it is C^∞ if it is C^n for all n.

We formalize these notions by defining iteratively the n+1-th derivative of a function as the derivative of the n-th derivative. It is called iterated_fderiv 𝕜 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 iterated_fderiv_within relative to a domain, as well as predicates cont_diff_within_at, cont_diff_at, cont_diff_on and cont_diff saying that the function is C^n within a set at a point, at a point, on a set and on the whole space respectively.

To avoid the issue of choice when choosing a derivative in sets where the derivative is not necessarily unique, cont_diff_on is not defined directly in terms of the regularity of the specific choice iterated_fderiv_within 𝕜 n f s inside s, but in terms of the existence of a nice sequence of derivatives, expressed with a predicate has_ftaylor_series_up_to_on.

We prove basic properties of these notions.

Main definitions and results #

Let f : E → F be a map between normed vector spaces over a nontrivially normed field 𝕜.

In sets of unique differentiability, cont_diff_on 𝕜 n f s can be expressed in terms of the properties of iterated_fderiv_within 𝕜 m f s for m ≤ n. In the whole space, cont_diff 𝕜 n f can be expressed in terms of the properties of iterated_fderiv 𝕜 m f for m ≤ n.

Implementation notes #

The definitions in this file are designed to work on any field 𝕜. They are sometimes slightly more complicated than the naive definitions one would guess from the intuition over the real or complex numbers, but they are designed to circumvent the lack of gluing properties and partitions of unity in general. In the usual situations, they coincide with the usual definitions.

Definition of C^n functions in domains #

One could define C^n functions in a domain s by fixing an arbitrary choice of derivatives (this is what we do with iterated_fderiv_within) and requiring that all these derivatives up to n are continuous. If the derivative is not unique, this could lead to strange behavior like two C^n functions f and g on s whose sum is not C^n. A better definition is thus to say that a function is C^n inside s if it admits a sequence of derivatives up to n inside s.

This definition still has the problem that a function which is locally C^n would not need to be C^n, as different choices of sequences of derivatives around different points might possibly not be glued together to give a globally defined sequence of derivatives. (Note that this issue can not happen over reals, thanks to partition of unity, but the behavior over a general field is not so clear, and we want a definition for general fields). Also, there are locality problems for the order parameter: one could image a function which, for each n, has a nice sequence of derivatives up to order n, but they do not coincide for varying n and can therefore not be glued to give rise to an infinite sequence of derivatives. This would give a function which is C^n for all n, but not C^∞. We solve this issue by putting locality conditions in space and order in our definition of cont_diff_within_at and cont_diff_on. The resulting definition is slightly more complicated to work with (in fact not so much), but it gives rise to completely satisfactory theorems.

For instance, with this definition, a real function which is C^m (but not better) on (-1/m, 1/m) for each natural m is by definition C^∞ at 0.

There is another issue with the definition of cont_diff_within_at 𝕜 n f s x. We can require the existence and good behavior of derivatives up to order n on a neighborhood of x within s. However, this does not imply continuity or differentiability within s of the function at x when x does not belong to s. Therefore, we require such existence and good behavior on a neighborhood of x within s ∪ {x} (which appears as insert x s in this file).

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 iterated_fderiv 𝕜 (n + 1) f x = iterated_fderiv 𝕜 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 we depart from this explicit approach 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 and barely usable, while the inductive proof is very simple. Thus, we give the inductive proof. As explained above, it works by generalizing over the target space, hence it only works well if all spaces belong to the same universe. To get the general version, we lift things to a common universe using a trick.

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.

Notations #

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 ⊤ : ℕ∞ with ∞.

Tags #

derivative, differentiability, higher derivative, C^n, multilinear, Taylor series, formal series

Functions with a Taylor series on a domain #

structure has_ftaylor_series_up_to_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] (n : ℕ∞) (f : E → F) (p : E → formal_multilinear_series 𝕜 E F) (s : set E) :
Prop

has_ftaylor_series_up_to_on 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 has_fderiv_within_at but for higher order derivatives.

theorem has_ftaylor_series_up_to_on.zero_eq' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) {x : E} (hx : x ∈ s) :
p x 0 = ⇑((continuous_multilinear_curry_fin0 𝕜 E F).symm) (f x)
theorem has_ftaylor_series_up_to_on.congr {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) (h₁ : ∀ (x : E), x ∈ s → f₁ x = f x) :

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 has_ftaylor_series_up_to_on.mono {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) {t : set E} (hst : t ⊆ s) :
theorem has_ftaylor_series_up_to_on.of_le {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {m n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) (hmn : m ≤ n) :
theorem has_ftaylor_series_up_to_on.continuous_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) :
theorem has_ftaylor_series_up_to_on_zero_iff {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {p : E → formal_multilinear_series 𝕜 E F} :
theorem has_ftaylor_series_up_to_on_top_iff' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {p : E → formal_multilinear_series 𝕜 E F} :
has_ftaylor_series_up_to_on ⊤ f p s ↔ (∀ (x : E), x ∈ s → (p x 0).uncurry0 = f x) ∧ ∀ (m : ℕ) (x : E), x ∈ s → has_fderiv_within_at (λ (y : E), p y m) (p x m.succ).curry_left s x

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

theorem has_ftaylor_series_up_to_on.has_fderiv_within_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) (hn : 1 ≤ n) (hx : x ∈ s) :

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 has_ftaylor_series_up_to_on.differentiable_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) (hn : 1 ≤ n) :
differentiable_on 𝕜 f s
theorem has_ftaylor_series_up_to_on.has_fderiv_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) (hn : 1 ≤ n) (hx : s ∈ nhds 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 has_ftaylor_series_up_to_on.eventually_has_fderiv_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) (hn : 1 ≤ n) (hx : s ∈ nhds x) :

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 has_ftaylor_series_up_to_on.differentiable_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) (hn : 1 ≤ n) (hx : s ∈ nhds x) :
differentiable_at 𝕜 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 has_ftaylor_series_up_to_on_succ_iff_left {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {p : E → formal_multilinear_series 𝕜 E F} {n : ℕ} :
has_ftaylor_series_up_to_on (↑n + 1) f p s ↔ has_ftaylor_series_up_to_on ↑n f p s ∧ (∀ (x : E), x ∈ s → has_fderiv_within_at (λ (y : E), p y n) (p x n.succ).curry_left s x) ∧ continuous_on (λ (x : E), 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 has_ftaylor_series_up_to_on_succ_iff_right {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {p : E → formal_multilinear_series 𝕜 E F} {n : ℕ} :
has_ftaylor_series_up_to_on ↑(n + 1) f p s ↔ (∀ (x : E), x ∈ s → (p x 0).uncurry0 = f x) ∧ (∀ (x : E), x ∈ s → has_fderiv_within_at (λ (y : E), p y 0) (p x 1).curry_left s x) ∧ has_ftaylor_series_up_to_on ↑n (λ (x : E), ⇑(continuous_multilinear_curry_fin1 𝕜 E F) (p x 1)) (λ (x : E), (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.

Smooth functions within a set around a point #

def cont_diff_within_at (𝕜 : Type u_1) [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] (n : ℕ∞) (f : E → F) (s : set E) (x : E) :
Prop

A function is continuously differentiable up to order n within a set s at a point x if it admits continuous derivatives up to order n in a neighborhood of x in s ∪ {x}. For n = ∞, we only require that this holds up to any finite order (where the neighborhood may depend on the finite order we consider).

For instance, a real function which is C^m on (-1/m, 1/m) for each natural m, but not better, is C^∞ at 0 within univ.

Equations
theorem cont_diff_within_at_nat {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ} :
theorem cont_diff_within_at.of_le {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {m n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) (hmn : m ≤ n) :
cont_diff_within_at 𝕜 m f s x
theorem cont_diff_within_at_iff_forall_nat_le {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} :
theorem cont_diff_within_at_top {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} :
theorem cont_diff_within_at.continuous_within_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) :
theorem cont_diff_within_at.congr_of_eventually_eq {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) (h₁ : f₁ =ᶠ[nhds_within x s] f) (hx : f₁ x = f x) :
cont_diff_within_at 𝕜 n f₁ s x
theorem cont_diff_within_at.congr_of_eventually_eq_insert {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) (h₁ : f₁ =ᶠ[nhds_within x (has_insert.insert x s)] f) :
cont_diff_within_at 𝕜 n f₁ s x
theorem cont_diff_within_at.congr_of_eventually_eq' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) (h₁ : f₁ =ᶠ[nhds_within x s] f) (hx : x ∈ s) :
cont_diff_within_at 𝕜 n f₁ s x
theorem filter.eventually_eq.cont_diff_within_at_iff {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {x : E} {n : ℕ∞} (h₁ : f₁ =ᶠ[nhds_within x s] f) (hx : f₁ x = f x) :
cont_diff_within_at 𝕜 n f₁ s x ↔ cont_diff_within_at 𝕜 n f s x
theorem cont_diff_within_at.congr {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) (h₁ : ∀ (y : E), y ∈ s → f₁ y = f y) (hx : f₁ x = f x) :
cont_diff_within_at 𝕜 n f₁ s x
theorem cont_diff_within_at.congr' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) (h₁ : ∀ (y : E), y ∈ s → f₁ y = f y) (hx : x ∈ s) :
cont_diff_within_at 𝕜 n f₁ s x
theorem cont_diff_within_at.mono_of_mem {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) {t : set E} (hst : s ∈ nhds_within x t) :
cont_diff_within_at 𝕜 n f t x
theorem cont_diff_within_at.mono {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) {t : set E} (hst : t ⊆ s) :
cont_diff_within_at 𝕜 n f t x
theorem cont_diff_within_at.congr_nhds {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) {t : set E} (hst : nhds_within x s = nhds_within x t) :
cont_diff_within_at 𝕜 n f t x
theorem cont_diff_within_at_congr_nhds {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {t : set E} (hst : nhds_within x s = nhds_within x t) :
cont_diff_within_at 𝕜 n f s x ↔ cont_diff_within_at 𝕜 n f t x
theorem cont_diff_within_at_inter' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s t : set E} {f : E → F} {x : E} {n : ℕ∞} (h : t ∈ nhds_within x s) :
cont_diff_within_at 𝕜 n f (s ∩ t) x ↔ cont_diff_within_at 𝕜 n f s x
theorem cont_diff_within_at_inter {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s t : set E} {f : E → F} {x : E} {n : ℕ∞} (h : t ∈ nhds x) :
cont_diff_within_at 𝕜 n f (s ∩ t) x ↔ cont_diff_within_at 𝕜 n f s x
theorem cont_diff_within_at_insert {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {y : E} :
cont_diff_within_at 𝕜 n f (has_insert.insert y s) x ↔ cont_diff_within_at 𝕜 n f s x
theorem cont_diff_within_at.of_insert {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {y : E} :
cont_diff_within_at 𝕜 n f (has_insert.insert y s) x → cont_diff_within_at 𝕜 n f s x

Alias of the forward direction of cont_diff_within_at_insert.

theorem cont_diff_within_at.insert' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {y : E} :
cont_diff_within_at 𝕜 n f s x → cont_diff_within_at 𝕜 n f (has_insert.insert y s) x

Alias of the reverse direction of cont_diff_within_at_insert.

theorem cont_diff_within_at.insert {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) :
theorem cont_diff_within_at.differentiable_within_at' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) (hn : 1 ≤ n) :

If a function is C^n within a set at a point, with n ≥ 1, then it is differentiable within this set at this point.

theorem cont_diff_within_at.differentiable_within_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) (hn : 1 ≤ n) :
theorem cont_diff_within_at_succ_iff_has_fderiv_within_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ} :
cont_diff_within_at 𝕜 ↑(n + 1) f s x ↔ ∃ (u : set E) (H : u ∈ nhds_within x (has_insert.insert x s)) (f' : E → (E →L[𝕜] F)), (∀ (x : E), x ∈ u → has_fderiv_within_at f (f' x) u x) ∧ cont_diff_within_at 𝕜 ↑n f' u x

A function is C^(n + 1) on a domain iff locally, it has a derivative which is C^n.

theorem cont_diff_within_at_succ_iff_has_fderiv_within_at' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ} :
cont_diff_within_at 𝕜 ↑(n + 1) f s x ↔ ∃ (u : set E) (H : u ∈ nhds_within x (has_insert.insert x s)), u ⊆ has_insert.insert x s ∧ ∃ (f' : E → (E →L[𝕜] F)), (∀ (x : E), x ∈ u → has_fderiv_within_at f (f' x) s x) ∧ cont_diff_within_at 𝕜 ↑n f' s x

A version of cont_diff_within_at_succ_iff_has_fderiv_within_at where all derivatives are taken within the same set.

Smooth functions within a set #

def cont_diff_on (𝕜 : Type u_1) [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] (n : ℕ∞) (f : E → F) (s : set E) :
Prop

A function is continuously differentiable up to n on s if, for any point x in s, it admits continuous derivatives up to order n on a neighborhood of x in s.

For n = ∞, we only require that this holds up to any finite order (where the neighborhood may depend on the finite order we consider).

Equations
theorem has_ftaylor_series_up_to_on.cont_diff_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} {f' : E → formal_multilinear_series 𝕜 E F} (hf : has_ftaylor_series_up_to_on n f f' s) :
cont_diff_on 𝕜 n f s
theorem cont_diff_on.cont_diff_within_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_on 𝕜 n f s) (hx : x ∈ s) :
cont_diff_within_at 𝕜 n f s x
theorem cont_diff_within_at.cont_diff_on' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {m : ℕ} (hm : ↑m ≤ n) (h : cont_diff_within_at 𝕜 n f s x) :
theorem cont_diff_within_at.cont_diff_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {m : ℕ} (hm : ↑m ≤ n) (h : cont_diff_within_at 𝕜 n f s x) :
@[protected]
theorem cont_diff_within_at.eventually {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ} (h : cont_diff_within_at 𝕜 ↑n f s x) :
theorem cont_diff_on.of_le {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {m n : ℕ∞} (h : cont_diff_on 𝕜 n f s) (hmn : m ≤ n) :
cont_diff_on 𝕜 m f s
theorem cont_diff_on.of_succ {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ} (h : cont_diff_on 𝕜 (↑n + 1) f s) :
cont_diff_on 𝕜 ↑n f s
theorem cont_diff_on.one_of_succ {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ} (h : cont_diff_on 𝕜 (↑n + 1) f s) :
cont_diff_on 𝕜 1 f s
theorem cont_diff_on_iff_forall_nat_le {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} :
cont_diff_on 𝕜 n f s ↔ ∀ (m : ℕ), ↑m ≤ n → cont_diff_on 𝕜 ↑m f s
theorem cont_diff_on_top {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} :
cont_diff_on 𝕜 ⊤ f s ↔ ∀ (n : ℕ), cont_diff_on 𝕜 ↑n f s
theorem cont_diff_on_all_iff_nat {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} :
(∀ (n : ℕ∞), cont_diff_on 𝕜 n f s) ↔ ∀ (n : ℕ), cont_diff_on 𝕜 ↑n f s
theorem cont_diff_on.continuous_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (h : cont_diff_on 𝕜 n f s) :
theorem cont_diff_on.congr {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {n : ℕ∞} (h : cont_diff_on 𝕜 n f s) (h₁ : ∀ (x : E), x ∈ s → f₁ x = f x) :
cont_diff_on 𝕜 n f₁ s
theorem cont_diff_on_congr {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {n : ℕ∞} (h₁ : ∀ (x : E), x ∈ s → f₁ x = f x) :
cont_diff_on 𝕜 n f₁ s ↔ cont_diff_on 𝕜 n f s
theorem cont_diff_on.mono {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (h : cont_diff_on 𝕜 n f s) {t : set E} (hst : t ⊆ s) :
cont_diff_on 𝕜 n f t
theorem cont_diff_on.congr_mono {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s s₁ : set E} {f f₁ : E → F} {n : ℕ∞} (hf : cont_diff_on 𝕜 n f s) (h₁ : ∀ (x : E), x ∈ s₁ → f₁ x = f x) (hs : s₁ ⊆ s) :
cont_diff_on 𝕜 n f₁ s₁
theorem cont_diff_on.differentiable_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (h : cont_diff_on 𝕜 n f s) (hn : 1 ≤ n) :
differentiable_on 𝕜 f s

If a function is C^n on a set with n ≥ 1, then it is differentiable there.

theorem cont_diff_on_of_locally_cont_diff_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (h : ∀ (x : E), x ∈ s → (∃ (u : set E), is_open u ∧ x ∈ u ∧ cont_diff_on 𝕜 n f (s ∩ u))) :
cont_diff_on 𝕜 n f s

If a function is C^n around each point in a set, then it is C^n on the set.

theorem cont_diff_on_succ_iff_has_fderiv_within_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ} :
cont_diff_on 𝕜 ↑(n + 1) f s ↔ ∀ (x : E), x ∈ s → (∃ (u : set E) (H : u ∈ nhds_within x (has_insert.insert x s)) (f' : E → (E →L[𝕜] F)), (∀ (x : E), x ∈ u → has_fderiv_within_at f (f' x) u x) ∧ cont_diff_on 𝕜 ↑n f' u)

A function is C^(n + 1) on a domain iff locally, it has a derivative which is C^n.

Iterated derivative within a set #

noncomputable def iterated_fderiv_within (𝕜 : Type u_1) [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] (n : ℕ) (f : E → F) (s : set E) :
E → continuous_multilinear_map 𝕜 (λ (i : fin n), E) 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..

Equations
noncomputable def ftaylor_series_within (𝕜 : Type u_1) [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] (f : E → F) (s : set E) (x : E) :

Formal Taylor series associated to a function within a set.

Equations
@[simp]
theorem iterated_fderiv_within_zero_apply {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} (m : fin 0 → E) :
⇑(iterated_fderiv_within 𝕜 0 f s x) m = f x
theorem iterated_fderiv_within_zero_eq_comp {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} :
@[simp]
theorem norm_iterated_fderiv_within_zero {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} :
theorem iterated_fderiv_within_succ_apply_left {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ} (m : fin (n + 1) → E) :
⇑(iterated_fderiv_within 𝕜 (n + 1) f s x) m = ⇑(⇑(fderiv_within 𝕜 (iterated_fderiv_within 𝕜 n f s) s x) (m 0)) (fin.tail m)
theorem iterated_fderiv_within_succ_eq_comp_left {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ} :
iterated_fderiv_within 𝕜 (n + 1) f s = ⇑(continuous_multilinear_curry_left_equiv 𝕜 (λ (i : fin (n + 1)), E) F) ∘ fderiv_within 𝕜 (iterated_fderiv_within 𝕜 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 norm_fderiv_within_iterated_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ} :
theorem iterated_fderiv_within_succ_apply_right {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ} (hs : unique_diff_on 𝕜 s) (hx : x ∈ s) (m : fin (n + 1) → E) :
⇑(iterated_fderiv_within 𝕜 (n + 1) f s x) m = ⇑(⇑(iterated_fderiv_within 𝕜 n (λ (y : E), fderiv_within 𝕜 f s y) s x) (fin.init m)) (m (fin.last n))
theorem iterated_fderiv_within_succ_eq_comp_right {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ} (hs : unique_diff_on 𝕜 s) (hx : x ∈ s) :
iterated_fderiv_within 𝕜 (n + 1) f s x = (⇑(continuous_multilinear_curry_right_equiv' 𝕜 n E F) ∘ iterated_fderiv_within 𝕜 n (λ (y : E), fderiv_within 𝕜 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_iterated_fderiv_within_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ} (hs : unique_diff_on 𝕜 s) (hx : x ∈ s) :
@[simp]
theorem iterated_fderiv_within_one_apply {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} (h : unique_diff_within_at 𝕜 s x) (m : fin 1 → E) :
⇑(iterated_fderiv_within 𝕜 1 f s x) m = ⇑(fderiv_within 𝕜 f s x) (m 0)
theorem filter.eventually_eq.iterated_fderiv_within' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s t : set E} {f f₁ : E → F} {x : E} (h : f₁ =ᶠ[nhds_within x s] f) (ht : t ⊆ s) (n : ℕ) :
@[protected]
theorem filter.eventually_eq.iterated_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {x : E} (h : f₁ =ᶠ[nhds_within x s] f) (n : ℕ) :
theorem filter.eventually_eq.iterated_fderiv_within_eq {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {x : E} (h : f₁ =ᶠ[nhds_within x s] f) (hx : f₁ x = f x) (n : ℕ) :
iterated_fderiv_within 𝕜 n f₁ s x = iterated_fderiv_within 𝕜 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 iterated_fderiv_within_congr {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} {x : E} (hs : set.eq_on f₁ f s) (hx : x ∈ s) (n : ℕ) :
iterated_fderiv_within 𝕜 n f₁ s x = iterated_fderiv_within 𝕜 n f s x

If two functions coincide on a set s, then their iterated differentials within this set coincide. See also filter.eventually_eq.iterated_fderiv_within_eq and filter.eventually_eq.iterated_fderiv_within.

@[protected]
theorem set.eq_on.iterated_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f f₁ : E → F} (hs : set.eq_on f₁ f s) (n : ℕ) :
set.eq_on (iterated_fderiv_within 𝕜 n f₁ s) (iterated_fderiv_within 𝕜 n f s) s

If two functions coincide on a set s, then their iterated differentials within this set coincide. See also filter.eventually_eq.iterated_fderiv_within_eq and filter.eventually_eq.iterated_fderiv_within.

theorem iterated_fderiv_within_eventually_congr_set' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s t : set E} {f : E → F} {x : E} (y : E) (h : s =ᶠ[nhds_within x {y}ᶜ] t) (n : ℕ) :
theorem iterated_fderiv_within_eventually_congr_set {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s t : set E} {f : E → F} {x : E} (h : s =ᶠ[nhds x] t) (n : ℕ) :
theorem iterated_fderiv_within_congr_set {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s t : set E} {f : E → F} {x : E} (h : s =ᶠ[nhds x] t) (n : ℕ) :
iterated_fderiv_within 𝕜 n f s x = iterated_fderiv_within 𝕜 n f t x
theorem iterated_fderiv_within_inter' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s u : set E} {f : E → F} {x : E} {n : ℕ} (hu : u ∈ nhds_within x s) :
iterated_fderiv_within 𝕜 n f (s ∩ u) x = iterated_fderiv_within 𝕜 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 iterated_fderiv_within_inter {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s u : set E} {f : E → F} {x : E} {n : ℕ} (hu : u ∈ nhds x) :
iterated_fderiv_within 𝕜 n f (s ∩ u) x = iterated_fderiv_within 𝕜 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 iterated_fderiv_within_inter_open {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s u : set E} {f : E → F} {x : E} {n : ℕ} (hu : is_open u) (hx : x ∈ u) :
iterated_fderiv_within 𝕜 n f (s ∩ u) x = iterated_fderiv_within 𝕜 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.

@[simp]
theorem cont_diff_on_zero {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} :
cont_diff_on 𝕜 0 f s ↔ continuous_on f s
theorem cont_diff_within_at_zero {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} (hx : x ∈ s) :
cont_diff_within_at 𝕜 0 f s x ↔ ∃ (u : set E) (H : u ∈ nhds_within x s), continuous_on f (s ∩ u)
theorem has_ftaylor_series_up_to_on.eq_ftaylor_series_of_unique_diff_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to_on n f p s) {m : ℕ} (hmn : ↑m ≤ n) (hs : unique_diff_on 𝕜 s) (hx : x ∈ s) :
p x m = iterated_fderiv_within 𝕜 m f s x

On a set with unique differentiability, any choice of iterated differential has to coincide with the one we have chosen in iterated_fderiv_within 𝕜 m f s.

theorem cont_diff_on.ftaylor_series_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (h : cont_diff_on 𝕜 n f s) (hs : unique_diff_on 𝕜 s) :

When a function is C^n in a set s of unique differentiability, it admits ftaylor_series_within 𝕜 f s as a Taylor series up to order n in s.

theorem cont_diff_on_of_continuous_on_differentiable_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (Hcont : ∀ (m : ℕ), ↑m ≤ n → continuous_on (λ (x : E), iterated_fderiv_within 𝕜 m f s x) s) (Hdiff : ∀ (m : ℕ), ↑m < n → differentiable_on 𝕜 (λ (x : E), iterated_fderiv_within 𝕜 m f s x) s) :
cont_diff_on 𝕜 n f s
theorem cont_diff_on_of_differentiable_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (h : ∀ (m : ℕ), ↑m ≤ n → differentiable_on 𝕜 (iterated_fderiv_within 𝕜 m f s) s) :
cont_diff_on 𝕜 n f s
theorem cont_diff_on.continuous_on_iterated_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} {m : ℕ} (h : cont_diff_on 𝕜 n f s) (hmn : ↑m ≤ n) (hs : unique_diff_on 𝕜 s) :
theorem cont_diff_on.differentiable_on_iterated_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} {m : ℕ} (h : cont_diff_on 𝕜 n f s) (hmn : ↑m < n) (hs : unique_diff_on 𝕜 s) :
differentiable_on 𝕜 (iterated_fderiv_within 𝕜 m f s) s
theorem cont_diff_within_at.differentiable_within_at_iterated_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} {m : ℕ} (h : cont_diff_within_at 𝕜 n f s x) (hmn : ↑m < n) (hs : unique_diff_on 𝕜 (has_insert.insert x s)) :
differentiable_within_at 𝕜 (iterated_fderiv_within 𝕜 m f s) s x
theorem cont_diff_on_iff_continuous_on_differentiable_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (hs : unique_diff_on 𝕜 s) :
cont_diff_on 𝕜 n f s ↔ (∀ (m : ℕ), ↑m ≤ n → continuous_on (λ (x : E), iterated_fderiv_within 𝕜 m f s x) s) ∧ ∀ (m : ℕ), ↑m < n → differentiable_on 𝕜 (λ (x : E), iterated_fderiv_within 𝕜 m f s x) s
theorem cont_diff_on_succ_of_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ} (hf : differentiable_on 𝕜 f s) (h : cont_diff_on 𝕜 ↑n (λ (y : E), fderiv_within 𝕜 f s y) s) :
cont_diff_on 𝕜 ↑(n + 1) f s
theorem cont_diff_on_succ_iff_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ} (hs : unique_diff_on 𝕜 s) :
cont_diff_on 𝕜 ↑(n + 1) f s ↔ differentiable_on 𝕜 f s ∧ cont_diff_on 𝕜 ↑n (λ (y : E), fderiv_within 𝕜 f s y) s

A function is C^(n + 1) on a domain with unique derivatives if and only if it is differentiable there, and its derivative (expressed with fderiv_within) is C^n.

theorem cont_diff_on_succ_iff_has_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ} (hs : unique_diff_on 𝕜 s) :
cont_diff_on 𝕜 ↑(n + 1) f s ↔ ∃ (f' : E → (E →L[𝕜] F)), cont_diff_on 𝕜 ↑n f' s ∧ ∀ (x : E), x ∈ s → has_fderiv_within_at f (f' x) s x
theorem cont_diff_on_succ_iff_fderiv_of_open {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ} (hs : is_open s) :
cont_diff_on 𝕜 ↑(n + 1) f s ↔ differentiable_on 𝕜 f s ∧ cont_diff_on 𝕜 ↑n (λ (y : E), fderiv 𝕜 f y) s

A function is C^(n + 1) on an open domain if and only if it is differentiable there, and its derivative (expressed with fderiv) is C^n.

theorem cont_diff_on_top_iff_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} (hs : unique_diff_on 𝕜 s) :
cont_diff_on 𝕜 ⊤ f s ↔ differentiable_on 𝕜 f s ∧ cont_diff_on 𝕜 ⊤ (λ (y : E), fderiv_within 𝕜 f s y) s

A function is C^∞ on a domain with unique derivatives if and only if it is differentiable there, and its derivative (expressed with fderiv_within) is C^∞.

theorem cont_diff_on_top_iff_fderiv_of_open {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} (hs : is_open s) :
cont_diff_on 𝕜 ⊤ f s ↔ differentiable_on 𝕜 f s ∧ cont_diff_on 𝕜 ⊤ (λ (y : E), fderiv 𝕜 f y) s

A function is C^∞ on an open domain if and only if it is differentiable there, and its derivative (expressed with fderiv) is C^∞.

theorem cont_diff_on.fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {m n : ℕ∞} (hf : cont_diff_on 𝕜 n f s) (hs : unique_diff_on 𝕜 s) (hmn : m + 1 ≤ n) :
cont_diff_on 𝕜 m (λ (y : E), fderiv_within 𝕜 f s y) s
theorem cont_diff_on.fderiv_of_open {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {m n : ℕ∞} (hf : cont_diff_on 𝕜 n f s) (hs : is_open s) (hmn : m + 1 ≤ n) :
cont_diff_on 𝕜 m (λ (y : E), fderiv 𝕜 f y) s
theorem cont_diff_on.continuous_on_fderiv_within {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (h : cont_diff_on 𝕜 n f s) (hs : unique_diff_on 𝕜 s) (hn : 1 ≤ n) :
continuous_on (λ (x : E), fderiv_within 𝕜 f s x) s
theorem cont_diff_on.continuous_on_fderiv_of_open {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (h : cont_diff_on 𝕜 n f s) (hs : is_open s) (hn : 1 ≤ n) :
continuous_on (λ (x : E), fderiv 𝕜 f x) s

Functions with a Taylor series on the whole space #

structure has_ftaylor_series_up_to {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] (n : ℕ∞) (f : E → F) (p : E → formal_multilinear_series 𝕜 E F) :
Prop

has_ftaylor_series_up_to 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 has_fderiv_at but for higher order derivatives.

theorem has_ftaylor_series_up_to.zero_eq' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to n f p) (x : E) :
p x 0 = ⇑((continuous_multilinear_curry_fin0 𝕜 E F).symm) (f x)
theorem has_ftaylor_series_up_to.has_ftaylor_series_up_to_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to n f p) (s : set E) :
theorem has_ftaylor_series_up_to.of_le {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {m n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to n f p) (hmn : m ≤ n) :
theorem has_ftaylor_series_up_to.continuous {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to n f p) :
theorem has_ftaylor_series_up_to_zero_iff {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {p : E → formal_multilinear_series 𝕜 E F} :
theorem has_ftaylor_series_up_to_top_iff' {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {p : E → formal_multilinear_series 𝕜 E F} :
has_ftaylor_series_up_to ⊤ f p ↔ (∀ (x : E), (p x 0).uncurry0 = f x) ∧ ∀ (m : ℕ) (x : E), has_fderiv_at (λ (y : E), p y m) (p x m.succ).curry_left x

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

theorem has_ftaylor_series_up_to.has_fderiv_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to n f p) (hn : 1 ≤ n) (x : E) :

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 has_ftaylor_series_up_to.differentiable {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} {p : E → formal_multilinear_series 𝕜 E F} (h : has_ftaylor_series_up_to n f p) (hn : 1 ≤ n) :
differentiable 𝕜 f
theorem has_ftaylor_series_up_to_succ_iff_right {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {p : E → formal_multilinear_series 𝕜 E F} {n : ℕ} :
has_ftaylor_series_up_to ↑(n + 1) f p ↔ (∀ (x : E), (p x 0).uncurry0 = f x) ∧ (∀ (x : E), has_fderiv_at (λ (y : E), p y 0) (p x 1).curry_left x) ∧ has_ftaylor_series_up_to ↑n (λ (x : E), ⇑(continuous_multilinear_curry_fin1 𝕜 E F) (p x 1)) (λ (x : E), (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.

Smooth functions at a point #

def cont_diff_at (𝕜 : Type u_1) [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] (n : ℕ∞) (f : E → F) (x : E) :
Prop

A function is continuously differentiable up to n at a point x if, for any integer k ≤ n, there is a neighborhood of x where f admits derivatives up to order n, which are continuous.

Equations
theorem cont_diff_within_at_univ {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ∞} :
cont_diff_within_at 𝕜 n f set.univ x ↔ cont_diff_at 𝕜 n f x
theorem cont_diff_at_top {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} :
cont_diff_at 𝕜 ⊤ f x ↔ ∀ (n : ℕ), cont_diff_at 𝕜 ↑n f x
theorem cont_diff_at.cont_diff_within_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_at 𝕜 n f x) :
cont_diff_within_at 𝕜 n f s x
theorem cont_diff_within_at.cont_diff_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_within_at 𝕜 n f s x) (hx : s ∈ nhds x) :
cont_diff_at 𝕜 n f x
theorem cont_diff_at.congr_of_eventually_eq {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f f₁ : E → F} {x : E} {n : ℕ∞} (h : cont_diff_at 𝕜 n f x) (hg : f₁ =ᶠ[nhds x] f) :
cont_diff_at 𝕜 n f₁ x
theorem cont_diff_at.of_le {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {m n : ℕ∞} (h : cont_diff_at 𝕜 n f x) (hmn : m ≤ n) :
cont_diff_at 𝕜 m f x
theorem cont_diff_at.continuous_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_at 𝕜 n f x) :
theorem cont_diff_at.differentiable_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff_at 𝕜 n f x) (hn : 1 ≤ n) :
differentiable_at 𝕜 f x

If a function is C^n with n ≥ 1 at a point, then it is differentiable there.

theorem cont_diff_at_succ_iff_has_fderiv_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ} :
cont_diff_at 𝕜 ↑(n + 1) f x ↔ ∃ (f' : E → (E →L[𝕜] F)), (∃ (u : set E) (H : u ∈ nhds x), ∀ (x : E), x ∈ u → has_fderiv_at f (f' x) x) ∧ cont_diff_at 𝕜 ↑n f' x

A function is C^(n + 1) at a point iff locally, it has a derivative which is C^n.

@[protected]
theorem cont_diff_at.eventually {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ} (h : cont_diff_at 𝕜 ↑n f x) :
∀ᶠ (y : E) in nhds x, cont_diff_at 𝕜 ↑n f y

Smooth functions #

def cont_diff (𝕜 : Type u_1) [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] (n : ℕ∞) (f : E → F) :
Prop

A function is continuously differentiable up to n if it admits derivatives up to order n, which are continuous. Contrary to the case of definitions in domains (where derivatives might not be unique) we do not need to localize the definition in space or time.

Equations
theorem has_ftaylor_series_up_to.cont_diff {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} {f' : E → formal_multilinear_series 𝕜 E F} (hf : has_ftaylor_series_up_to n f f') :
cont_diff 𝕜 n f

If f has a Taylor series up to n, then it is C^n.

theorem cont_diff_on_univ {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} :
cont_diff_on 𝕜 n f set.univ ↔ cont_diff 𝕜 n f
theorem cont_diff_iff_cont_diff_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} :
cont_diff 𝕜 n f ↔ ∀ (x : E), cont_diff_at 𝕜 n f x
theorem cont_diff.cont_diff_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff 𝕜 n f) :
cont_diff_at 𝕜 n f x
theorem cont_diff.cont_diff_within_at {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {x : E} {n : ℕ∞} (h : cont_diff 𝕜 n f) :
cont_diff_within_at 𝕜 n f s x
theorem cont_diff_top {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} :
cont_diff 𝕜 ⊤ f ↔ ∀ (n : ℕ), cont_diff 𝕜 ↑n f
theorem cont_diff_all_iff_nat {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} :
(∀ (n : ℕ∞), cont_diff 𝕜 n f) ↔ ∀ (n : ℕ), cont_diff 𝕜 ↑n f
theorem cont_diff.cont_diff_on {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} {n : ℕ∞} (h : cont_diff 𝕜 n f) :
cont_diff_on 𝕜 n f s
@[simp]
theorem cont_diff_zero {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} :
cont_diff 𝕜 0 f ↔ continuous f
theorem cont_diff_at_zero {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} :
cont_diff_at 𝕜 0 f x ↔ ∃ (u : set E) (H : u ∈ nhds x), continuous_on f u
theorem cont_diff_at_one_iff {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} :
cont_diff_at 𝕜 1 f x ↔ ∃ (f' : E → (E →L[𝕜] F)) (u : set E) (H : u ∈ nhds x), continuous_on f' u ∧ ∀ (x : E), x ∈ u → has_fderiv_at f (f' x) x
theorem cont_diff.of_le {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {m n : ℕ∞} (h : cont_diff 𝕜 n f) (hmn : m ≤ n) :
cont_diff 𝕜 m f
theorem cont_diff.of_succ {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ} (h : cont_diff 𝕜 (↑n + 1) f) :
cont_diff 𝕜 ↑n f
theorem cont_diff.one_of_succ {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ} (h : cont_diff 𝕜 (↑n + 1) f) :
cont_diff 𝕜 1 f
theorem cont_diff.continuous {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} (h : cont_diff 𝕜 n f) :
theorem cont_diff.differentiable {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} (h : cont_diff 𝕜 n f) (hn : 1 ≤ n) :
differentiable 𝕜 f

If a function is C^n with n ≥ 1, then it is differentiable.

theorem cont_diff_iff_forall_nat_le {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} :
cont_diff 𝕜 n f ↔ ∀ (m : ℕ), ↑m ≤ n → cont_diff 𝕜 ↑m f
theorem cont_diff_succ_iff_has_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ} :
cont_diff 𝕜 ↑(n + 1) f ↔ ∃ (f' : E → (E →L[𝕜] F)), cont_diff 𝕜 ↑n f' ∧ ∀ (x : E), has_fderiv_at f (f' x) x

A function is C^(n+1) iff it has a C^n derivative.

Iterated derivative #

noncomputable def iterated_fderiv (𝕜 : Type u_1) [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] (n : ℕ) (f : E → F) :
E → continuous_multilinear_map 𝕜 (λ (i : fin n), E) F

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

Equations
noncomputable def ftaylor_series (𝕜 : Type u_1) [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] (f : E → F) (x : E) :

Formal Taylor series associated to a function within a set.

Equations
@[simp]
theorem iterated_fderiv_zero_apply {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} (m : fin 0 → E) :
⇑(iterated_fderiv 𝕜 0 f x) m = f x
theorem iterated_fderiv_zero_eq_comp {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} :
@[simp]
theorem norm_iterated_fderiv_zero {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} :
theorem iterated_fderiv_with_zero_eq {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} :
iterated_fderiv_within 𝕜 0 f s = iterated_fderiv 𝕜 0 f
theorem iterated_fderiv_succ_apply_left {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ} (m : fin (n + 1) → E) :
⇑(iterated_fderiv 𝕜 (n + 1) f x) m = ⇑(⇑(fderiv 𝕜 (iterated_fderiv 𝕜 n f) x) (m 0)) (fin.tail m)
theorem iterated_fderiv_succ_eq_comp_left {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ} :
iterated_fderiv 𝕜 (n + 1) f = ⇑(continuous_multilinear_curry_left_equiv 𝕜 (λ (i : fin (n + 1)), E) F) ∘ fderiv 𝕜 (iterated_fderiv 𝕜 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_iterated_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ} :
fderiv 𝕜 (iterated_fderiv 𝕜 n f) = ⇑((continuous_multilinear_curry_left_equiv 𝕜 (λ (i : fin (n + 1)), E) F).symm) ∘ iterated_fderiv 𝕜 (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 has_compact_support.iterated_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} (hf : has_compact_support f) (n : ℕ) :
theorem norm_fderiv_iterated_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ} :
‖fderiv 𝕜 (iterated_fderiv 𝕜 n f) x‖ = ‖iterated_fderiv 𝕜 (n + 1) f x‖
theorem iterated_fderiv_within_univ {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ} :
theorem iterated_fderiv_within_of_is_open {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {s : set E} {f : E → F} (n : ℕ) (hs : is_open s) :
set.eq_on (iterated_fderiv_within 𝕜 n f s) (iterated_fderiv 𝕜 n f) s

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

theorem ftaylor_series_within_univ {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} :
theorem iterated_fderiv_succ_apply_right {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ} (m : fin (n + 1) → E) :
⇑(iterated_fderiv 𝕜 (n + 1) f x) m = ⇑(⇑(iterated_fderiv 𝕜 n (λ (y : E), fderiv 𝕜 f y) x) (fin.init m)) (m (fin.last n))
theorem iterated_fderiv_succ_eq_comp_right {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ} :
iterated_fderiv 𝕜 (n + 1) f x = (⇑(continuous_multilinear_curry_right_equiv' 𝕜 n E F) ∘ iterated_fderiv 𝕜 n (λ (y : E), 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_iterated_fderiv_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} {n : ℕ} :
‖iterated_fderiv 𝕜 n (fderiv 𝕜 f) x‖ = ‖iterated_fderiv 𝕜 (n + 1) f x‖
@[simp]
theorem iterated_fderiv_one_apply {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {x : E} (m : fin 1 → E) :
⇑(iterated_fderiv 𝕜 1 f x) m = ⇑(fderiv 𝕜 f x) (m 0)
theorem cont_diff_iff_ftaylor_series {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} :

When a function is C^n in a set s of unique differentiability, it admits ftaylor_series_within 𝕜 f s as a Taylor series up to order n in s.

theorem cont_diff_iff_continuous_differentiable {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} :
cont_diff 𝕜 n f ↔ (∀ (m : ℕ), ↑m ≤ n → continuous (λ (x : E), iterated_fderiv 𝕜 m f x)) ∧ ∀ (m : ℕ), ↑m < n → differentiable 𝕜 (λ (x : E), iterated_fderiv 𝕜 m f x)
theorem cont_diff.continuous_iterated_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} {m : ℕ} (hm : ↑m ≤ n) (hf : cont_diff 𝕜 n f) :
continuous (λ (x : E), iterated_fderiv 𝕜 m f x)

If f is C^n then its m-times iterated derivative is continuous for m ≤ n.

theorem cont_diff.differentiable_iterated_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} {m : ℕ} (hm : ↑m < n) (hf : cont_diff 𝕜 n f) :
differentiable 𝕜 (λ (x : E), iterated_fderiv 𝕜 m f x)

If f is C^n then its m-times iterated derivative is differentiable for m < n.

theorem cont_diff_of_differentiable_iterated_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} (h : ∀ (m : ℕ), ↑m ≤ n → differentiable 𝕜 (iterated_fderiv 𝕜 m f)) :
cont_diff 𝕜 n f
theorem cont_diff_succ_iff_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ} :
cont_diff 𝕜 ↑(n + 1) f ↔ differentiable 𝕜 f ∧ cont_diff 𝕜 ↑n (λ (y : E), fderiv 𝕜 f y)

A function is C^(n + 1) if and only if it is differentiable, and its derivative (formulated in terms of fderiv) is C^n.

theorem cont_diff_one_iff_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} :
cont_diff 𝕜 1 f ↔ differentiable 𝕜 f ∧ continuous (fderiv 𝕜 f)
theorem cont_diff_top_iff_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} :
cont_diff 𝕜 ⊤ f ↔ differentiable 𝕜 f ∧ cont_diff 𝕜 ⊤ (λ (y : E), fderiv 𝕜 f y)

A function is C^∞ if and only if it is differentiable, and its derivative (formulated in terms of fderiv) is C^∞.

theorem cont_diff.continuous_fderiv {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} (h : cont_diff 𝕜 n f) (hn : 1 ≤ n) :
continuous (λ (x : E), fderiv 𝕜 f x)
theorem cont_diff.continuous_fderiv_apply {𝕜 : Type u_1} [nontrivially_normed_field 𝕜] {E : Type u_2} [normed_add_comm_group E] [normed_space 𝕜 E] {F : Type u_3} [normed_add_comm_group F] [normed_space 𝕜 F] {f : E → F} {n : ℕ∞} (h : cont_diff 𝕜 n f) (hn : 1 ≤ n) :
continuous (λ (p : E × E), ⇑(fderiv 𝕜 f p.fst) p.snd)

If a function is at least C^1, its bundled derivative (mapping (x, v) to Df(x) v) is continuous.