Higher differentiability of composition #
We prove that the composition of C^n
functions is C^n
.
We also expand the API around C^n
functions.
Main results #
ContDiff.comp
states that the composition of twoC^n
functions isC^n
.
Similar results are given for C^n
functions on domains.
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 (⊤ : ℕ∞) : WithTop ℕ∞
with ∞
and ⊤ : WithTop ℕ∞
with ω
.
Tags #
derivative, differentiability, higher derivative, C^n
, multilinear, Taylor series, formal series
Constants #
Constants are C^∞
.
Smoothness of linear functions #
Unbundled bounded linear functions are C^n
.
The identity is C^n
.
Bilinear functions are C^n
.
If f
admits a Taylor series p
in a set s
, and g
is linear, then g ∘ f
admits a Taylor
series whose k
-th term is given by g ∘ (p k)
.
Composition by continuous linear maps on the left preserves C^n
functions in a domain
at a point.
Composition by continuous linear maps on the left preserves C^n
functions in a domain
at a point.
Composition by continuous linear maps on the left preserves C^n
functions on domains.
Composition by continuous linear maps on the left preserves C^n
functions.
The iterated derivative within a set of the composition with a linear map on the left is obtained by applying the linear map to the iterated derivative.
The iterated derivative of the composition with a linear map on the left is obtained by applying the linear map to the iterated derivative.
The iterated derivative within a set of the composition with a linear equiv on the left is obtained by applying the linear equiv to the iterated derivative. This is true without differentiability assumptions.
Composition with a linear isometry on the left preserves the norm of the iterated derivative within a set.
Composition with a linear isometry on the left preserves the norm of the iterated derivative.
Composition with a linear isometry equiv on the left preserves the norm of the iterated derivative within a set.
Composition with a linear isometry equiv on the left preserves the norm of the iterated derivative.
Composition by continuous linear equivs on the left respects higher differentiability at a point in a domain.
Composition by continuous linear equivs on the left respects higher differentiability at a point.
Composition by continuous linear equivs on the left respects higher differentiability on domains.
Composition by continuous linear equivs on the left respects higher differentiability.
If f
admits a Taylor series p
in a set s
, and g
is linear, then f ∘ g
admits a Taylor
series in g ⁻¹' s
, whose k
-th term is given by p k (g v₁, ..., g vₖ)
.
Composition by continuous linear maps on the right preserves C^n
functions at a point on
a domain.
Composition by continuous linear maps on the right preserves C^n
functions on domains.
Composition by continuous linear maps on the right preserves C^n
functions.
The iterated derivative within a set of the composition with a linear map on the right is obtained by composing the iterated derivative with the linear map.
The iterated derivative within a set of the composition with a linear equiv on the right is obtained by composing the iterated derivative with the linear equiv.
The iterated derivative of the composition with a linear map on the right is obtained by composing the iterated derivative with the linear map.
Composition with a linear isometry on the right preserves the norm of the iterated derivative within a set.
Composition with a linear isometry on the right preserves the norm of the iterated derivative within a set.
Composition by continuous linear equivs on the right respects higher differentiability at a point in a domain.
Composition by continuous linear equivs on the right respects higher differentiability at a point.
Composition by continuous linear equivs on the right respects higher differentiability on domains.
Composition by continuous linear equivs on the right respects higher differentiability.
If two functions f
and g
admit Taylor series p
and q
in a set s
, then the cartesian
product of f
and g
admits the cartesian product of p
and q
as a Taylor series.
The cartesian product of C^n
functions at a point in a domain is C^n
.
The cartesian product of C^n
functions on domains is C^n
.
The cartesian product of C^n
functions at a point is C^n
.
The cartesian product of C^n
functions is C^n
.
Composition of C^n
functions #
We show that the composition of C^n
functions is C^n
. One way to do this would be to
use the following simple inductive proof. Assume it is done for n
.
Then, to check it for n+1
, one needs to check that the derivative of g ∘ f
is C^n
, i.e.,
that Dg(f x) ⬝ Df(x)
is C^n
. The term Dg (f x)
is the composition of two C^n
functions, so
it is C^n
by the inductive assumption. The term Df(x)
is also C^n
. Then, the matrix
multiplication is the application of a bilinear map (which is C^∞
, and therefore C^n
) to
x ↦ (Dg(f x), Df x)
. As the composition of two C^n
maps, it is again C^n
, and we are done.
There are two difficulties in this proof.
The first one is that it is an induction over all Banach
spaces. In Lean, this is only possible if they belong to a fixed universe. One could formalize this
by first proving the statement in this case, and then extending the result to general universes
by embedding all the spaces we consider in a common universe through ULift
.
The second one is that it does not work cleanly for analytic maps: for this case, we need to exhibit a whole sequence of derivatives which are all analytic, not just finitely many of them, so an induction is never enough at a finite step.
Both these difficulties can be overcome with some cost. However, we choose a different path: we
write down an explicit formula for the n
-th derivative of g ∘ f
in terms of derivatives of
g
and f
(this is the formula of Faa-Di Bruno) and use this formula to get a suitable Taylor
expansion for g ∘ f
. Writing down the formula of Faa-Di Bruno is not easy as the formula is quite
intricate, but it is also useful for other purposes and once available it makes the proof here
essentially trivial.
The composition of C^n
functions at points in domains is C^n
.
The composition of C^n
functions on domains is C^n
.
The composition of C^n
functions on domains is C^n
.
Alias of ContDiffOn.comp_inter
.
The composition of C^n
functions on domains is C^n
.
The composition of a C^n
function on a domain with a C^n
function is C^n
.
The composition of C^n
functions is C^n
.
The composition of C^n
functions at points in domains is C^n
.
The composition of C^n
functions at points in domains is C^n
,
with a weaker condition on s
and t
.
Alias of ContDiffWithinAt.comp_of_mem_nhdsWithin_image
.
The composition of C^n
functions at points in domains is C^n
,
with a weaker condition on s
and t
.
The composition of C^n
functions at points in domains is C^n
,
with a weaker condition on s
and t
.
The composition of C^n
functions at points in domains is C^n
.
The composition of C^n
functions at points in domains is C^n
.
The composition of C^n
functions at points in domains is C^n
,
with a weaker condition on s
and t
.
Alias of ContDiffWithinAt.comp_inter
.
The composition of C^n
functions at points in domains is C^n
.
The composition of C^n
functions at points in domains is C^n
,
with a weaker condition on s
and t
.
The composition of C^n
functions at points is C^n
.
Smoothness of projections #
The first projection in a product is C^∞
.
Postcomposing f
with Prod.fst
is C^n
Precomposing f
with Prod.fst
is C^n
The first projection on a domain in a product is C^∞
.
The first projection at a point in a product is C^∞
.
Postcomposing f
with Prod.fst
is C^n
at (x, y)
Precomposing f
with Prod.fst
is C^n
at (x, y)
Precomposing f
with Prod.fst
is C^n
at x : E × F
The first projection within a domain at a point in a product is C^∞
.
The second projection in a product is C^∞
.
Postcomposing f
with Prod.snd
is C^n
Precomposing f
with Prod.snd
is C^n
The second projection on a domain in a product is C^∞
.
The second projection at a point in a product is C^∞
.
Postcomposing f
with Prod.snd
is C^n
at x
Precomposing f
with Prod.snd
is C^n
at (x, y)
Precomposing f
with Prod.snd
is C^n
at x : E × F
The second projection within a domain at a point in a product is C^∞
.
Alias of ContDiffAt.comp₂_contDiffWithinAt
.
Alias of ContDiff.comp₂_contDiffAt
.
Alias of ContDiff.comp₂_contDiffWithinAt
.
Alias of ContDiff.comp₂_contDiffOn
.
Alias of ContDiff.comp₂_contDiffOn
.
Alias of ContDiff.comp₃_contDiffOn
.
Alias of ContDiff.comp₃_contDiffOn
.
Application of a ContinuousLinearMap
to a constant commutes with iteratedFDerivWithin
.
Application of a ContinuousLinearMap
to a constant commutes with iteratedFDeriv
.
The natural equivalence (E × F) × G ≃ E × (F × G)
is smooth.
Warning: if you think you need this lemma, it is likely that you can simplify your proof by reformulating the lemma that you're applying next using the tips in Note [continuity lemma statement]
The natural equivalence E × (F × G) ≃ (E × F) × G
is smooth.
Warning: see remarks attached to contDiff_prodAssoc
Bundled derivatives are smooth #
One direction of contDiffWithinAt_succ_iff_hasFDerivWithinAt
, but where all derivatives are
taken within the same set. Version for partial derivatives / functions with parameters. If f x
is
a C^n+1
family of functions and g x
is a C^n
family of points, then the derivative of f x
at
g x
depends in a C^n
way on x
. We give a general version of this fact relative to sets which
may not have unique derivatives, in the following form. If f : E × F → G
is C^n+1
at
(x₀, g(x₀))
in (s ∪ {x₀}) × t ⊆ E × F
and g : E → F
is C^n
at x₀
within some set s ⊆ E
,
then there is a function f' : E → F →L[𝕜] G
that is C^n
at x₀
within s
such that for all x
sufficiently close to x₀
within s ∪ {x₀}
the function y ↦ f x y
has derivative f' x
at g x
within t ⊆ F
. For convenience, we return an explicit set of x
's where this holds that is a
subset of s ∪ {x₀}
. We need one additional condition, namely that t
is a neighborhood of
g(x₀)
within g '' s
.
The most general lemma stating that x ↦ fderivWithin 𝕜 (f x) t (g x)
is C^n
at a point within a set.
To show that x ↦ D_yf(x,y)g(x)
(taken within t
) is C^m
at x₀
within s
, we require that
f
isC^n
at(x₀, g(x₀))
within(s ∪ {x₀}) × t
forn ≥ m+1
.g
isC^m
atx₀
withins
;- Derivatives are unique at
g(x)
withint
forx
sufficiently close tox₀
withins ∪ {x₀}
; t
is a neighborhood ofg(x₀)
withing '' s
;
A special case of ContDiffWithinAt.fderivWithin''
where we require that s ⊆ g⁻¹(t)
.
A special case of ContDiffWithinAt.fderivWithin'
where we require that x₀ ∈ s
and there
are unique derivatives everywhere within t
.
x ↦ fderivWithin 𝕜 (f x) t (g x) (k x)
is smooth at a point within a set.
fderivWithin 𝕜 f s
is smooth at x₀
within s
.
x ↦ fderivWithin 𝕜 f s x (k x)
is smooth at x₀
within s
.
x ↦ fderiv 𝕜 (f x) (g x)
is smooth at x₀
.
fderiv 𝕜 f
is smooth at x₀
.
x ↦ fderiv 𝕜 (f x) (g x)
is smooth.
fderiv 𝕜 f
is smooth.
x ↦ fderiv 𝕜 (f x) (g x)
is continuous.
x ↦ fderiv 𝕜 (f x) (g x) (k x)
is smooth.
The bundled derivative of a C^{n+1}
function is C^n
.
If a function is at least C^1
, its bundled derivative (mapping (x, v)
to Df(x) v
) is
continuous.
The bundled derivative of a C^{n+1}
function is C^n
.
One dimension #
All results up to now have been expressed in terms of the general Fréchet derivative fderiv
. For
maps defined on the field, the one-dimensional derivative deriv
is often easier to use. In this
paragraph, we reformulate some higher smoothness results in terms of deriv
.
A function is C^(n + 1)
on a domain with unique derivatives if and only if it is
differentiable there, and its derivative (formulated with derivWithin
) is C^n
.
Alias of contDiffOn_infty_iff_derivWithin
.
A function is C^(n + 1)
on an open domain if and only if it is
differentiable there, and its derivative (formulated with deriv
) is C^n
.
Alias of contDiffOn_infty_iff_deriv_of_isOpen
.
A function is C^(n + 1)
if and only if it is differentiable,
and its derivative (formulated in terms of deriv
) is C^n
.
Alias of contDiff_infty_iff_deriv
.