Higher differentiability of usual operations #
We prove that the usual operations (addition, multiplication, difference, composition, and
so on) preserve C^n
functions. 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 ⊤ : ℕ∞
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^∞
.
The identity is C^∞
.
Bilinear functions are C^∞
.
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 prove it would be to write
the n
-th derivative of the composition (this is Faà di Bruno's formula) and check its continuity,
but this is very painful. Instead, we go for a 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 is a subtlety in this argument: we apply the inductive assumption to functions on other Banach
spaces. In maths, one would say: prove by induction over n
that, for all C^n
maps between all
pairs of Banach spaces, their composition is C^n
. In Lean, this is fine as long as the spaces
stay in the same universe. This is not the case in the above argument: if E
lives in universe u
and F
lives in universe v
, then linear maps from E
to F
(to which the derivative of f
belongs) is in universe max u v
. If one could quantify over finitely many universes, the above
proof would work fine, but this is not the case. One could still write the proof considering spaces
in any universe in u, v, w, max u v, max v w, max u v w
, but it would be extremely tedious and
lead to a lot of duplication. Instead, we formulate the above proof when all spaces live in the same
universe (where everything is fine), and then we deduce the general result by lifting all our spaces
to a common universe through ULift
. This lifting is done through a continuous linear equiv.
We have already proved that composing with such a linear equiv does not change the fact of
being C^n
, which concludes the proof.
The composition of C^n
functions on domains is C^n
.
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
.
The composition of C^n
functions at points in domains is C^n
.
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 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
taken within the same set. Version for partial derivatives / functions with parameters. 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 ↦ 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
.
Smoothness of functions f : E → Π i, F' i
#
Sum of two functions #
The sum of two C^n
functions within a set at a point is C^n
within this set
at this point.
The sum of two C^n
functions at a point is C^n
at this point.
The sum of two C^n
functions is C^n
.
The sum of two C^n
functions on a domain is C^n
.
The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
See also iteratedFDerivWithin_add_apply'
, which uses the spelling (fun x ↦ f x + g x)
instead of f + g
.
The iterated derivative of the sum of two functions is the sum of the iterated derivatives.
This is the same as iteratedFDerivWithin_add_apply
, but using the spelling (fun x ↦ f x + g x)
instead of f + g
, which can be handy for some rewrites.
TODO: use one form consistently.
Negative #
The negative of a C^n
function within a domain at a point is C^n
within this domain at
this point.
The negative of a C^n
function at a point is C^n
at this point.
The negative of a C^n
function is C^n
.
The negative of a C^n
function on a domain is C^n
.
Subtraction #
The difference of two C^n
functions within a set at a point is C^n
within this set
at this point.
The difference of two C^n
functions at a point is C^n
at this point.
The difference of two C^n
functions on a domain is C^n
.
The difference of two C^n
functions is C^n
.
Sum of finitely many functions #
Product of two functions #
The product of two C^n
functions within a set at a point is C^n
within this set
at this point.
The product of two C^n
functions at a point is C^n
at this point.
The product of two C^n
functions on a domain is C^n
.
The product of two C^n
functions is C^n
.
Scalar multiplication #
The scalar multiplication of two C^n
functions within a set at a point is C^n
within this
set at this point.
The scalar multiplication of two C^n
functions at a point is C^n
at this point.
The scalar multiplication of two C^n
functions is C^n
.
The scalar multiplication of two C^n
functions on a domain is C^n
.
Constant scalar multiplication #
Porting note (#11215): TODO: generalize results in this section.
- It should be possible to assume
[Monoid R] [DistribMulAction R F] [SMulCommClass 𝕜 R F]
. - If
c
is a unit (orR
is a group), then one can dropContDiff*
assumptions in some lemmas.
The scalar multiplication of a constant and a C^n
function within a set at a point is C^n
within this set at this point.
The scalar multiplication of a constant and a C^n
function at a point is C^n
at this
point.
The scalar multiplication of a constant and a C^n
function is C^n
.
The scalar multiplication of a constant and a C^n
on a domain is C^n
.
Cartesian product of two functions #
The product map of two C^n
functions within a set at a point is C^n
within the product set at the product point.
The product map of two C^n
functions on a set is C^n
on the product set.
The product map of two C^n
functions within a set at a point is C^n
within the product set at the product point.
The product map of two C^n
functions within a set at a point is C^n
within the product set at the product point.
The product map of two C^n
functions is C^n
.
Inversion in a complete normed algebra #
In a complete normed algebra, the operation of inversion is C^n
, for all n
, at each
invertible element. The proof is by induction, bootstrapping using an identity expressing the
derivative of inversion as a bilinear map of inversion itself.
Inversion of continuous linear maps between Banach spaces #
At a continuous linear equivalence e : E ≃L[𝕜] F
between Banach spaces, the operation of
inversion is C^n
, for all n
.
If f
is a local homeomorphism and the point a
is in its target,
and if f
is n
times continuously differentiable at f.symm a
,
and if the derivative at f.symm a
is a continuous linear equivalence,
then f.symm
is n
times continuously differentiable at the point a
.
This is one of the easy parts of the inverse function theorem: it assumes that we already have an inverse function.
If f
is an n
times continuously differentiable homeomorphism,
and if the derivative of f
at each point is a continuous linear equivalence,
then f.symm
is n
times continuously differentiable.
This is one of the easy parts of the inverse function theorem: it assumes that we already have an inverse function.
Let f
be a local homeomorphism of a nontrivially normed field, let a
be a point in its
target. if f
is n
times continuously differentiable at f.symm a
, and if the derivative at
f.symm a
is nonzero, then f.symm
is n
times continuously differentiable at the point a
.
This is one of the easy parts of the inverse function theorem: it assumes that we already have an inverse function.
Let f
be an n
times continuously differentiable homeomorphism of a nontrivially normed
field. Suppose that the derivative of f
is never equal to zero. Then f.symm
is n
times
continuously differentiable.
This is one of the easy parts of the inverse function theorem: it assumes that we already have an inverse function.
Restrict a partial homeomorphism to the subsets of the source and target
that consist of points x ∈ f.source
, y = f x ∈ f.target
such that f
is C^n
at x
and f.symm
is C^n
at y
.
Note that n
is a natural number, not ∞
,
because the set of points of C^∞
-smoothness of f
is not guaranteed to be open.
Equations
Instances For
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
.
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
.
A function is C^∞
on a domain with unique derivatives if and only if it is differentiable
there, and its derivative (formulated with derivWithin
) is C^∞
.
A function is C^∞
on an open domain if and only if it is differentiable
there, and its derivative (formulated with deriv
) is C^∞
.
A function is C^(n + 1)
if and only if it is differentiable,
and its derivative (formulated in terms of deriv
) is C^n
.
A function is C^∞
if and only if it is differentiable,
and its derivative (formulated in terms of deriv
) is C^∞
.
Restricting from ℂ
to ℝ
, or generally from 𝕜'
to 𝕜
#
If a function is n
times continuously differentiable over ℂ
, then it is n
times continuously
differentiable over ℝ
. In this paragraph, we give variants of this statement, in the general
situation where ℂ
and ℝ
are replaced respectively by 𝕜'
and 𝕜
where 𝕜'
is a normed algebra
over 𝕜
.