The derivative of functions between smooth manifolds #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
Let M
and M'
be two smooth manifolds with corners over a field 𝕜
(with respective models with
corners I
on (E, H)
and I'
on (E', H')
), and let f : M → M'
. We define the
derivative of the function at a point, within a set or along the whole space, mimicking the API
for (Fréchet) derivatives. It is denoted by mfderiv I I' f x
, where "m" stands for "manifold" and
"f" for "Fréchet" (as in the usual derivative fderiv 𝕜 f x
).
Main definitions #
unique_mdiff_on I s
: predicate saying that, at each point of the sets
, a function can have at most one derivative. This technical condition is important when we definemfderiv_within
below, as otherwise there is an arbitrary choice in the derivative, and many properties will fail (for instance the chain rule). This is analogous tounique_diff_on 𝕜 s
in a vector space.
Let f
be a map between smooth manifolds. The following definitions follow the fderiv
API.
mfderiv I I' f x
: the derivative off
atx
, as a continuous linear map from the tangent space atx
to the tangent space atf x
. If the map is not differentiable, this is0
.mfderiv_within I I' f s x
: the derivative off
atx
withins
, as a continuous linear map from the tangent space atx
to the tangent space atf x
. If the map is not differentiable withins
, this is0
.mdifferentiable_at I I' f x
: Prop expressing whetherf
is differentiable atx
.mdifferentiable_within_at 𝕜 f s x
: Prop expressing whetherf
is differentiable withins
atx
.has_mfderiv_at I I' f s x f'
: Prop expressing whetherf
hasf'
as a derivative atx
.has_mfderiv_within_at I I' f s x f'
: Prop expressing whetherf
hasf'
as a derivative withins
atx
.mdifferentiable_on I I' f s
: Prop expressing thatf
is differentiable on the sets
.mdifferentiable I I' f
: Prop expressing thatf
is differentiable everywhere.tangent_map I I' f
: the derivative off
, as a map from the tangent bundle ofM
to the tangent bundle ofM'
.
We also establish results on the differential of the identity, constant functions, charts, extended charts. For functions between vector spaces, we show that the usual notions and the manifold notions coincide.
Implementation notes #
The tangent bundle is constructed using the machinery of topological fiber bundles, for which one
can define bundled morphisms and construct canonically maps from the total space of one bundle to
the total space of another one. One could use this mechanism to construct directly the derivative
of a smooth map. However, we want to define the derivative of any map (and let it be zero if the map
is not differentiable) to avoid proof arguments everywhere. This means we have to go back to the
details of the definition of the total space of a fiber bundle constructed from core, to cook up a
suitable definition of the derivative. It is the following: at each point, we have a preferred chart
(used to identify the fiber above the point with the model vector space in fiber bundles). Then one
should read the function using these preferred charts at x
and f x
, and take the derivative
of f
in these charts.
Due to the fact that we are working in a model with corners, with an additional embedding I
of the
model space H
in the model vector space E
, the charts taking values in E
are not the original
charts of the manifold, but those ones composed with I
, called extended charts. We define
written_in_ext_chart I I' x f
for the function f
written in the preferred extended charts. Then
the manifold derivative of f
, at x
, is just the usual derivative of
written_in_ext_chart I I' x f
, at the point (ext_chart_at I x) x
.
There is a subtelty with respect to continuity: if the function is not continuous, then the image
of a small open set around x
will not be contained in the source of the preferred chart around
f x
, which means that when reading f
in the chart one is losing some information. To avoid this,
we include continuity in the definition of differentiablity (which is reasonable since with any
definition, differentiability implies continuity).
Warning: the derivative (even within a subset) is a linear map on the whole tangent space. Suppose
that one is given a smooth submanifold N
, and a function which is smooth on N
(i.e., its
restriction to the subtype N
is smooth). Then, in the whole manifold M
, the property
mdifferentiable_on I I' f N
holds. However, mfderiv_within I I' f N
is not uniquely defined
(what values would one choose for vectors that are transverse to N
?), which can create issues down
the road. The problem here is that knowing the value of f
along N
does not determine the
differential of f
in all directions. This is in contrast to the case where N
would be an open
subset, or a submanifold with boundary of maximal dimension, where this issue does not appear.
The predicate unique_mdiff_on I N
indicates that the derivative along N
is unique if it exists,
and is an assumption in most statements requiring a form of uniqueness.
On a vector space, the manifold derivative and the usual derivative are equal. This means in particular that they live on the same space, i.e., the tangent space is defeq to the original vector space. To get this property is a motivation for our definition of the tangent space as a single copy of the vector space, instead of more usual definitions such as the space of derivations, or the space of equivalence classes of smooth curves in the manifold.
Tags #
Derivative, manifold
Derivative of maps between manifolds #
The derivative of a smooth map f
between smooth manifold M
and M'
at x
is a bounded linear
map from the tangent space to M
at x
, to the tangent space to M'
at f x
. Since we defined
the tangent space using one specific chart, the formula for the derivative is written in terms of
this specific chart.
We use the names mdifferentiable
and mfderiv
, where the prefix letter m
means "manifold".
Property in the model space of a model with corners of being differentiable within at set at a point, when read in the model vector space. This property will be lifted to manifolds to define differentiable functions between manifolds.
Being differentiable in the model space is a local property, invariant under smooth maps. Therefore, it will lift nicely to manifolds.
Predicate ensuring that, at a point and within a set, a function can have at most one derivative. This is expressed using the preferred chart at the considered point.
Equations
- unique_mdiff_within_at I s x = unique_diff_within_at 𝕜 (⇑((ext_chart_at I x).symm) ⁻¹' s ∩ set.range ⇑I) (⇑(ext_chart_at I x) x)
Predicate ensuring that, at all points of a set, a function can have at most one derivative.
Equations
- unique_mdiff_on I s = ∀ (x : M), x ∈ s → unique_mdiff_within_at I s x
mdifferentiable_within_at I I' f s x
indicates that the function f
between manifolds
has a derivative at the point x
within the set s
.
This is a generalization of differentiable_within_at
to manifolds.
We require continuity in the definition, as otherwise points close to x
in s
could be sent by
f
outside of the chart domain around f x
. Then the chart could do anything to the image points,
and in particular by coincidence written_in_ext_chart_at I I' x f
could be differentiable, while
this would not mean anything relevant.
Equations
- mdifferentiable_within_at I I' f s x = (continuous_within_at f s x ∧ differentiable_within_at 𝕜 (written_in_ext_chart_at I I' x f) (⇑((ext_chart_at I x).symm) ⁻¹' s ∩ set.range ⇑I) (⇑(ext_chart_at I x) x))
mdifferentiable_at I I' f x
indicates that the function f
between manifolds
has a derivative at the point x
.
This is a generalization of differentiable_at
to manifolds.
We require continuity in the definition, as otherwise points close to x
could be sent by
f
outside of the chart domain around f x
. Then the chart could do anything to the image points,
and in particular by coincidence written_in_ext_chart_at I I' x f
could be differentiable, while
this would not mean anything relevant.
Equations
- mdifferentiable_at I I' f x = (continuous_at f x ∧ differentiable_within_at 𝕜 (written_in_ext_chart_at I I' x f) (set.range ⇑I) (⇑(ext_chart_at I x) x))
mdifferentiable_on I I' f s
indicates that the function f
between manifolds
has a derivative within s
at all points of s
.
This is a generalization of differentiable_on
to manifolds.
Equations
- mdifferentiable_on I I' f s = ∀ (x : M), x ∈ s → mdifferentiable_within_at I I' f s x
mdifferentiable I I' f
indicates that the function f
between manifolds
has a derivative everywhere.
This is a generalization of differentiable
to manifolds.
Equations
- mdifferentiable I I' f = ∀ (x : M), mdifferentiable_at I I' f x
Prop registering if a local homeomorphism is a local diffeomorphism on its source
Equations
- local_homeomorph.mdifferentiable I I' f = (mdifferentiable_on I I' ⇑f f.to_local_equiv.source ∧ mdifferentiable_on I' I ⇑(f.symm) f.to_local_equiv.target)
has_mfderiv_within_at I I' f s x f'
indicates that the function f
between manifolds
has, at the point x
and within the set s
, the derivative f'
. Here, f'
is a continuous linear
map from the tangent space at x
to the tangent space at f x
.
This is a generalization of has_fderiv_within_at
to manifolds (as indicated by the prefix m
).
The order of arguments is changed as the type of the derivative f'
depends on the choice of x
.
We require continuity in the definition, as otherwise points close to x
in s
could be sent by
f
outside of the chart domain around f x
. Then the chart could do anything to the image points,
and in particular by coincidence written_in_ext_chart_at I I' x f
could be differentiable, while
this would not mean anything relevant.
Equations
- has_mfderiv_within_at I I' f s x f' = (continuous_within_at f s x ∧ has_fderiv_within_at (written_in_ext_chart_at I I' x f) f' (⇑((ext_chart_at I x).symm) ⁻¹' s ∩ set.range ⇑I) (⇑(ext_chart_at I x) x))
has_mfderiv_at I I' f x f'
indicates that the function f
between manifolds
has, at the point x
, the derivative f'
. Here, f'
is a continuous linear
map from the tangent space at x
to the tangent space at f x
.
We require continuity in the definition, as otherwise points close to x
s
could be sent by
f
outside of the chart domain around f x
. Then the chart could do anything to the image points,
and in particular by coincidence written_in_ext_chart_at I I' x f
could be differentiable, while
this would not mean anything relevant.
Equations
- has_mfderiv_at I I' f x f' = (continuous_at f x ∧ has_fderiv_within_at (written_in_ext_chart_at I I' x f) f' (set.range ⇑I) (⇑(ext_chart_at I x) x))
Let f
be a function between two smooth manifolds. Then mfderiv_within I I' f s x
is the
derivative of f
at x
within s
, as a continuous linear map from the tangent space at x
to the
tangent space at f x
.
Equations
- mfderiv_within I I' f s x = ite (mdifferentiable_within_at I I' f s x) (fderiv_within 𝕜 (written_in_ext_chart_at I I' x f) (⇑((ext_chart_at I x).symm) ⁻¹' s ∩ set.range ⇑I) (⇑(ext_chart_at I x) x)) 0
Let f
be a function between two smooth manifolds. Then mfderiv I I' f x
is the derivative of
f
at x
, as a continuous linear map from the tangent space at x
to the tangent space at
f x
.
Equations
- mfderiv I I' f x = ite (mdifferentiable_at I I' f x) (fderiv_within 𝕜 (written_in_ext_chart_at I I' x f) (set.range ⇑I) (⇑(ext_chart_at I x) x)) 0
The derivative within a set, as a map between the tangent bundles
Equations
- tangent_map_within I I' f s = λ (p : tangent_bundle I M), {proj := f p.proj, snd := ⇑(mfderiv_within I I' f s p.proj) p.snd}
The derivative, as a map between the tangent bundles
Unique differentiability sets in manifolds #
unique_mdiff_within_at
achieves its goal: it implies the uniqueness of the derivative.
General lemmas on derivatives of functions between manifolds #
We mimick the API for functions between vector spaces
One can reformulate differentiability within a set at a point as continuity within this set at this point, and differentiability in any chart containing that point.
Deriving continuity from differentiability on manifolds #
Congruence lemmas for derivatives on manifolds #
A congruence lemma for mfderiv
, (ab)using the fact that tangent_space I' (f x)
is
definitionally equal to E'
.
A congruence lemma for mfderiv
, (ab)using the fact that tangent_space I' (f x)
is
definitionally equal to E'
.
Composition lemmas #
The chain rule.
Relations between vector space derivative and manifold derivative #
The manifold derivative mfderiv
, when considered on the model vector space with its trivial
manifold structure, coincides with the usual Frechet derivative fderiv
. In this section, we prove
this and related statements.
Alias of the reverse direction of unique_mdiff_within_at_iff_unique_diff_within_at
.
Alias of the forward direction of unique_mdiff_within_at_iff_unique_diff_within_at
.
Alias of the reverse direction of unique_mdiff_on_iff_unique_diff_on
.
Alias of the forward direction of unique_mdiff_on_iff_unique_diff_on
.
Alias of the forward direction of has_mfderiv_within_at_iff_has_fderiv_within_at
.
Alias of the reverse direction of has_mfderiv_within_at_iff_has_fderiv_within_at
.
Alias of the forward direction of has_mfderiv_at_iff_has_fderiv_at
.
Alias of the reverse direction of has_mfderiv_at_iff_has_fderiv_at
.
For maps between vector spaces, mdifferentiable_within_at
and fdifferentiable_within_at
coincide
Alias of the reverse direction of mdifferentiable_within_at_iff_differentiable_within_at
.
Alias of the forward direction of mdifferentiable_within_at_iff_differentiable_within_at
.
For maps between vector spaces, mdifferentiable_at
and differentiable_at
coincide
Alias of the forward direction of mdifferentiable_at_iff_differentiable_at
.
Alias of the reverse direction of mdifferentiable_at_iff_differentiable_at
.
For maps between vector spaces, mdifferentiable_on
and differentiable_on
coincide
Alias of the forward direction of mdifferentiable_on_iff_differentiable_on
.
Alias of the reverse direction of mdifferentiable_on_iff_differentiable_on
.
For maps between vector spaces, mdifferentiable
and differentiable
coincide
Alias of the forward direction of mdifferentiable_iff_differentiable
.
Alias of the reverse direction of mdifferentiable_iff_differentiable
.
For maps between vector spaces, mfderiv_within
and fderiv_within
coincide
Differentiability of specific functions #
Identity #
Constants #
Operations on the product of two manifolds
The total derivative of a function in two variables is the sum of the partial derivatives.
Note that to state this (without casts) we need to be able to see through the definition of
tangent_space
.
Arithmetic #
Note that in the in has_mfderiv_at
lemmas there is an abuse of the defeq between E'
and
tangent_space 𝓘(𝕜, E') (f z)
(similarly for g',F',p',q'
). In general this defeq is not
canonical, but in this case (the tangent space of a vector space) it is canonical.
Model with corners #
The derivative of the chart at a base point is the chart of the tangent bundle, composed with the identification between the tangent bundle of the model space and the product space.
The derivative of the inverse of the chart at a base point is the inverse of the chart of the tangent bundle, composed with the identification between the tangent bundle of the model space and the product space.
Differentiable local homeomorphisms #
The derivative of a differentiable local homeomorphism, as a continuous linear equivalence
between the tangent spaces at x
and e x
.
Differentiability of ext_chart_at
#
Unique derivative sets in manifolds #
If a set has the unique differential property, then its image under a local diffeomorphism also has the unique differential property.
If a set in a manifold has the unique derivative property, then its pullback by any extended chart, in the vector space, also has the unique derivative property.
When considering functions between manifolds, this statement shows up often. It entails the unique differential of the pullback in extended charts of the set where the function can be read in the charts.
In a smooth fiber bundle, the preimage under the projection of a set with unique differential in the basis also has unique differential.