# mathlib3documentation

geometry.manifold.cont_mdiff_mfderiv

### Interactions between differentiability, smoothness and manifold derivatives #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

We give the relation between mdifferentiable, cont_mdiff, mfderiv, tangent_map and related notions.

## Main statements #

• cont_mdiff_on.cont_mdiff_on_tangent_map_within states that the bundled derivative of a Cⁿ function in a domain is Cᵐ when m + 1 ≤ n.
• cont_mdiff.cont_mdiff_tangent_map states that the bundled derivative of a Cⁿ function is Cᵐ when m + 1 ≤ n.

### Deducing differentiability from smoothness #

theorem cont_mdiff_within_at.mdifferentiable_within_at {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {f : M M'} {s : set M} {x : M} {n : ℕ∞} (hf : n f s x) (hn : 1 n) :
s x
theorem cont_mdiff_at.mdifferentiable_at {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {f : M M'} {x : M} {n : ℕ∞} (hf : I' n f x) (hn : 1 n) :
f x
theorem cont_mdiff_on.mdifferentiable_on {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {f : M M'} {s : set M} {n : ℕ∞} (hf : I' n f s) (hn : 1 n) :
f s
theorem cont_mdiff.mdifferentiable {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {f : M M'} {n : ℕ∞} (hf : I' n f) (hn : 1 n) :
I' f
theorem smooth_within_at.mdifferentiable_within_at {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {f : M M'} {s : set M} {x : M} (hf : I' f s x) :
s x
theorem smooth_at.mdifferentiable_at {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {f : M M'} {x : M} (hf : I' f x) :
f x
theorem smooth_on.mdifferentiable_on {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {f : M M'} {s : set M} (hf : I' f s) :
f s
theorem smooth.mdifferentiable {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {f : M M'} (hf : I' f) :
I' f
theorem smooth.mdifferentiable_at {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {f : M M'} {x : M} (hf : I' f) :
f x
theorem smooth.mdifferentiable_within_at {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {f : M M'} {s : set M} {x : M} (hf : I' f) :
s x

### The derivative of a smooth function is smooth #

theorem cont_mdiff_at.mfderiv {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] [Is : M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] [I's : M'] {F : Type u_8} [ F] {G : Type u_9} {J : G} {N : Type u_10} [ N] [Js : N] {m n : ℕ∞} {x₀ : N} (f : N M M') (g : N M) (hf : cont_mdiff_at (J.prod I) I' n (x₀, g x₀)) (hg : m g x₀) (hmn : m + 1 n) :
(E →L[𝕜] E')) m g (λ (x : N), f x (g x)) (λ (x : N), I' (f x) (g x)) x₀) x₀

The function that sends x to the y-derivative of f(x,y) at g(x) is C^m at x₀, where the derivative is taken as a continuous linear map. We have to assume that f is C^n at (x₀, g(x₀)) for n ≥ m + 1 and g is C^m at x₀. We have to insert a coordinate change from x₀ to x to make the derivative sensible. This result is used to show that maps into the 1-jet bundle and cotangent bundle are smooth. cont_mdiff_at.mfderiv_id and cont_mdiff_at.mfderiv_const are special cases of this.

This result should be generalized to a cont_mdiff_within_at for mfderiv_within. If we do that, we can deduce cont_mdiff_on.cont_mdiff_on_tangent_map_within from this.

theorem cont_mdiff_at.mfderiv_const {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] [Is : M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] [I's : M'] {m n : ℕ∞} {x₀ : M} {f : M M'} (hf : I' n f x₀) (hmn : m + 1 n) :
(E →L[𝕜] E')) m id f (mfderiv I I' f) x₀) x₀

The derivative D_yf(y) is C^m at x₀, where the derivative is taken as a continuous linear map. We have to assume that f is C^n at x₀ for some n ≥ m + 1. We have to insert a coordinate change from x₀ to x to make the derivative sensible. This is a special case of cont_mdiff_at.mfderiv where f does not contain any parameters and g = id.

theorem cont_mdiff_at.mfderiv_apply {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] [Is : M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] [I's : M'] {F : Type u_8} [ F] {G : Type u_9} {J : G} {N : Type u_10} [ N] [Js : N] {F' : Type u_11} [ F'] {G' : Type u_12} {J' : G'} {N' : Type u_13} [ N'] {m n : ℕ∞} {x₀ : N'} (f : N M M') (g : N M) (g₁ : N' N) (g₂ : N' E) (hf : cont_mdiff_at (J.prod I) I' n (g₁ x₀, g (g₁ x₀))) (hg : m g (g₁ x₀)) (hg₁ : J m g₁ x₀) (hg₂ : m g₂ x₀) (hmn : m + 1 n) :
E') m (λ (x : N'), g (λ (x : N), f x (g x)) (λ (x : N), I' (f x) (g x)) (g₁ x₀) (g₁ x)) (g₂ x)) x₀

The function that sends x to the y-derivative of f(x,y) at g(x) applied to g₂(x) is C^n at x₀, where the derivative is taken as a continuous linear map. We have to assume that f is C^(n+1) at (x₀, g(x₀)) and g is C^n at x₀. We have to insert a coordinate change from x₀ to g₁(x) to make the derivative sensible.

This is similar to cont_mdiff_at.mfderiv, but where the continuous linear map is applied to a (variable) vector.

### The tangent map of a smooth function is smooth #

theorem cont_mdiff_on.continuous_on_tangent_map_within_aux {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {n : ℕ∞} {f : H H'} {s : set H} (hf : I' n f s) (hn : 1 n) (hs : s) :
continuous_on I' f s)

If a function is C^n with 1 ≤ n on a domain with unique derivatives, then its bundled derivative is continuous. In this auxiliary lemma, we prove this fact when the source and target space are model spaces in models with corners. The general fact is proved in cont_mdiff_on.continuous_on_tangent_map_within

theorem cont_mdiff_on.cont_mdiff_on_tangent_map_within_aux {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {m n : ℕ∞} {f : H H'} {s : set H} (hf : I' n f s) (hmn : m + 1 n) (hs : s) :
m I' f s)

If a function is C^n on a domain with unique derivatives, then its bundled derivative is C^m when m+1 ≤ n. In this auxiliary lemma, we prove this fact when the source and target space are model spaces in models with corners. The general fact is proved in cont_mdiff_on.cont_mdiff_on_tangent_map_within

theorem cont_mdiff_on.cont_mdiff_on_tangent_map_within {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] [Is : M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] [I's : M'] {f : M M'} {s : set M} {m n : ℕ∞} (hf : I' n f s) (hmn : m + 1 n) (hs : s) :
m I' f s)

If a function is C^n on a domain with unique derivatives, then its bundled derivative is C^m when m+1 ≤ n.

theorem cont_mdiff_on.continuous_on_tangent_map_within {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] [Is : M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] [I's : M'] {f : M M'} {s : set M} {n : ℕ∞} (hf : I' n f s) (hmn : 1 n) (hs : s) :
continuous_on I' f s)

If a function is C^n on a domain with unique derivatives, with 1 ≤ n, then its bundled derivative is continuous there.

theorem cont_mdiff.cont_mdiff_tangent_map {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] [Is : M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] [I's : M'] {f : M M'} {m n : ℕ∞} (hf : I' n f) (hmn : m + 1 n) :
I'.tangent m I' f)

If a function is C^n, then its bundled derivative is C^m when m+1 ≤ n.

theorem cont_mdiff.continuous_tangent_map {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] [Is : M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] [I's : M'] {f : M M'} {n : ℕ∞} (hf : I' n f) (hmn : 1 n) :

If a function is C^n, with 1 ≤ n, then its bundled derivative is continuous.

theorem tangent_bundle.tangent_map_tangent_bundle_pure {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} (I : H) (M : Type u_4) [ M] [Is : M] (p : M) :
(tangent_space I)) p = {proj := {proj := p.proj, snd := 0}, snd := (p.snd, 0)}

The derivative of the zero section of the tangent bundle maps ⟨x, v⟩ to ⟨⟨x, 0⟩, ⟨v, 0⟩⟩.

Note that, as currently framed, this is a statement in coordinates, thus reliant on the choice of the coordinate system we use on the tangent bundle.

However, the result itself is coordinate-dependent only to the extent that the coordinates determine a splitting of the tangent bundle. Moreover, there is a canonical splitting at each point of the zero section (since there is a canonical horizontal space there, the tangent space to the zero section, in addition to the canonical vertical space which is the kernel of the derivative of the projection), and this canonical splitting is also the one that comes from the coordinates on the tangent bundle in our definitions. So this statement is not as crazy as it may seem.

TODO define splittings of vector bundles; state this result invariantly.

@[protected]
theorem cont_mdiff_map.mdifferentiable' {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] {n : ℕ∞} (f : I' M M' n) (hn : 1 n) :
I' f
@[protected]
theorem cont_mdiff_map.mdifferentiable {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] (f : I' M M' ) :
I' f
@[protected]
theorem cont_mdiff_map.mdifferentiable_at {𝕜 : Type u_1} {E : Type u_2} [ E] {H : Type u_3} {I : H} {M : Type u_4} [ M] {E' : Type u_5} [ E'] {H' : Type u_6} {I' : H'} {M' : Type u_7} [ M'] (f : I' M M' ) {x : M} :
f x