Documentation

Mathlib.Analysis.Calculus.Deriv.Comp

One-dimensional derivatives of compositions of functions #

In this file we prove the chain rule for the following cases:

Here π•œ is the base normed field, E and F are normed spaces over π•œ and π•œ' is an algebra over π•œ (e.g., π•œ'=π•œ or π•œ=ℝ, π•œ'=β„‚).

We also give versions with the of_eq suffix, which require an equality proof instead of definitional equality of the different points used in the composition. These versions are often more flexible to use.

For a more detailed overview of one-dimensional derivatives in mathlib, see the module docstring of analysis/calculus/deriv/basic.

Keywords #

derivative, chain rule

Derivative of the composition of a vector function and a scalar function #

We use scomp in lemmas on composition of vector valued and scalar valued functions, and comp in lemmas on composition of scalar valued functions, in analogy for smul and mul (and also because the comp version with the shorter name will show up much more often in applications). The formula for the derivative involves smul in scomp lemmas, which can be reduced to usual multiplication in comp lemmas.

theorem HasDerivAtFilter.scomp {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {L : Filter π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} {L' : Filter π•œ'} (hg : HasDerivAtFilter g₁ g₁' (h x) L') (hh : HasDerivAtFilter h h' x L) (hL : Filter.Tendsto h L L') :
HasDerivAtFilter (g₁ ∘ h) (h' β€’ g₁') x L
theorem HasDerivAtFilter.scomp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {L : Filter π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} {L' : Filter π•œ'} {y : π•œ'} (hg : HasDerivAtFilter g₁ g₁' y L') (hh : HasDerivAtFilter h h' x L) (hy : y = h x) (hL : Filter.Tendsto h L L') :
HasDerivAtFilter (g₁ ∘ h) (h' β€’ g₁') x L
theorem HasDerivWithinAt.scomp_hasDerivAt {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {s' : Set π•œ'} {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} (hg : HasDerivWithinAt g₁ g₁' s' (h x)) (hh : HasDerivAt h h' x) (hs : βˆ€ (x : π•œ), h x ∈ s') :
HasDerivAt (g₁ ∘ h) (h' β€’ g₁') x
theorem HasDerivWithinAt.scomp_hasDerivAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {s' : Set π•œ'} {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} {y : π•œ'} (hg : HasDerivWithinAt g₁ g₁' s' y) (hh : HasDerivAt h h' x) (hs : βˆ€ (x : π•œ), h x ∈ s') (hy : y = h x) :
HasDerivAt (g₁ ∘ h) (h' β€’ g₁') x
theorem HasDerivWithinAt.scomp {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {t' : Set π•œ'} {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} (hg : HasDerivWithinAt g₁ g₁' t' (h x)) (hh : HasDerivWithinAt h h' s x) (hst : Set.MapsTo h s t') :
HasDerivWithinAt (g₁ ∘ h) (h' β€’ g₁') s x
theorem HasDerivWithinAt.scomp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {t' : Set π•œ'} {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} {y : π•œ'} (hg : HasDerivWithinAt g₁ g₁' t' y) (hh : HasDerivWithinAt h h' s x) (hst : Set.MapsTo h s t') (hy : y = h x) :
HasDerivWithinAt (g₁ ∘ h) (h' β€’ g₁') s x
theorem HasDerivAt.scomp {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} (hg : HasDerivAt g₁ g₁' (h x)) (hh : HasDerivAt h h' x) :
HasDerivAt (g₁ ∘ h) (h' β€’ g₁') x

The chain rule.

theorem HasDerivAt.scomp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} {y : π•œ'} (hg : HasDerivAt g₁ g₁' y) (hh : HasDerivAt h h' x) (hy : y = h x) :
HasDerivAt (g₁ ∘ h) (h' β€’ g₁') x

The chain rule.

theorem HasStrictDerivAt.scomp {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} (hg : HasStrictDerivAt g₁ g₁' (h x)) (hh : HasStrictDerivAt h h' x) :
HasStrictDerivAt (g₁ ∘ h) (h' β€’ g₁') x
theorem HasStrictDerivAt.scomp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} {y : π•œ'} (hg : HasStrictDerivAt g₁ g₁' y) (hh : HasStrictDerivAt h h' x) (hy : y = h x) :
HasStrictDerivAt (g₁ ∘ h) (h' β€’ g₁') x
theorem HasDerivAt.scomp_hasDerivWithinAt {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} (hg : HasDerivAt g₁ g₁' (h x)) (hh : HasDerivWithinAt h h' s x) :
HasDerivWithinAt (g₁ ∘ h) (h' β€’ g₁') s x
theorem HasDerivAt.scomp_hasDerivWithinAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {h : π•œ β†’ π•œ'} {h' : π•œ'} {g₁ : π•œ' β†’ F} {g₁' : F} {y : π•œ'} (hg : HasDerivAt g₁ g₁' y) (hh : HasDerivWithinAt h h' s x) (hy : y = h x) :
HasDerivWithinAt (g₁ ∘ h) (h' β€’ g₁') s x
theorem derivWithin.scomp {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {t' : Set π•œ'} {h : π•œ β†’ π•œ'} {g₁ : π•œ' β†’ F} (hg : DifferentiableWithinAt π•œ' g₁ t' (h x)) (hh : DifferentiableWithinAt π•œ h s x) (hs : Set.MapsTo h s t') (hxs : UniqueDiffWithinAt π•œ s x) :
derivWithin (g₁ ∘ h) s x = derivWithin h s x β€’ derivWithin g₁ t' (h x)
theorem derivWithin.scomp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {t' : Set π•œ'} {h : π•œ β†’ π•œ'} {g₁ : π•œ' β†’ F} {y : π•œ'} (hg : DifferentiableWithinAt π•œ' g₁ t' y) (hh : DifferentiableWithinAt π•œ h s x) (hs : Set.MapsTo h s t') (hxs : UniqueDiffWithinAt π•œ s x) (hy : y = h x) :
derivWithin (g₁ ∘ h) s x = derivWithin h s x β€’ derivWithin g₁ t' (h x)
theorem deriv.scomp {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {h : π•œ β†’ π•œ'} {g₁ : π•œ' β†’ F} (hg : DifferentiableAt π•œ' g₁ (h x)) (hh : DifferentiableAt π•œ h x) :
deriv (g₁ ∘ h) x = deriv h x β€’ deriv g₁ (h x)
theorem deriv.scomp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] [NormedSpace π•œ' F] [IsScalarTower π•œ π•œ' F] {h : π•œ β†’ π•œ'} {g₁ : π•œ' β†’ F} {y : π•œ'} (hg : DifferentiableAt π•œ' g₁ y) (hh : DifferentiableAt π•œ h x) (hy : y = h x) :
deriv (g₁ ∘ h) x = deriv h x β€’ deriv g₁ (h x)

Derivative of the composition of a scalar and vector functions #

theorem HasDerivAtFilter.comp_hasFDerivAtFilter {π•œ : Type u} [NontriviallyNormedField π•œ] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {hβ‚‚ : π•œ' β†’ π•œ'} {hβ‚‚' : π•œ'} {L' : Filter π•œ'} {f : E β†’ π•œ'} {f' : E β†’L[π•œ] π•œ'} (x : E) {L'' : Filter E} (hhβ‚‚ : HasDerivAtFilter hβ‚‚ hβ‚‚' (f x) L') (hf : HasFDerivAtFilter f f' x L'') (hL : Filter.Tendsto f L'' L') :
HasFDerivAtFilter (hβ‚‚ ∘ f) (hβ‚‚' β€’ f') x L''
theorem HasDerivAtFilter.comp_hasFDerivAtFilter_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {hβ‚‚ : π•œ' β†’ π•œ'} {hβ‚‚' : π•œ'} {L' : Filter π•œ'} {y : π•œ'} {f : E β†’ π•œ'} {f' : E β†’L[π•œ] π•œ'} (x : E) {L'' : Filter E} (hhβ‚‚ : HasDerivAtFilter hβ‚‚ hβ‚‚' y L') (hf : HasFDerivAtFilter f f' x L'') (hL : Filter.Tendsto f L'' L') (hy : y = f x) :
HasFDerivAtFilter (hβ‚‚ ∘ f) (hβ‚‚' β€’ f') x L''
theorem HasStrictDerivAt.comp_hasStrictFDerivAt {π•œ : Type u} [NontriviallyNormedField π•œ] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {hβ‚‚ : π•œ' β†’ π•œ'} {hβ‚‚' : π•œ'} {f : E β†’ π•œ'} {f' : E β†’L[π•œ] π•œ'} (x : E) (hh : HasStrictDerivAt hβ‚‚ hβ‚‚' (f x)) (hf : HasStrictFDerivAt f f' x) :
HasStrictFDerivAt (hβ‚‚ ∘ f) (hβ‚‚' β€’ f') x
theorem HasStrictDerivAt.comp_hasStrictFDerivAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {hβ‚‚ : π•œ' β†’ π•œ'} {hβ‚‚' : π•œ'} {y : π•œ'} {f : E β†’ π•œ'} {f' : E β†’L[π•œ] π•œ'} (x : E) (hh : HasStrictDerivAt hβ‚‚ hβ‚‚' y) (hf : HasStrictFDerivAt f f' x) (hy : y = f x) :
HasStrictFDerivAt (hβ‚‚ ∘ f) (hβ‚‚' β€’ f') x
theorem HasDerivAt.comp_hasFDerivAt {π•œ : Type u} [NontriviallyNormedField π•œ] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {hβ‚‚ : π•œ' β†’ π•œ'} {hβ‚‚' : π•œ'} {f : E β†’ π•œ'} {f' : E β†’L[π•œ] π•œ'} (x : E) (hh : HasDerivAt hβ‚‚ hβ‚‚' (f x)) (hf : HasFDerivAt f f' x) :
HasFDerivAt (hβ‚‚ ∘ f) (hβ‚‚' β€’ f') x
theorem HasDerivAt.comp_hasFDerivAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {hβ‚‚ : π•œ' β†’ π•œ'} {hβ‚‚' : π•œ'} {y : π•œ'} {f : E β†’ π•œ'} {f' : E β†’L[π•œ] π•œ'} (x : E) (hh : HasDerivAt hβ‚‚ hβ‚‚' y) (hf : HasFDerivAt f f' x) (hy : y = f x) :
HasFDerivAt (hβ‚‚ ∘ f) (hβ‚‚' β€’ f') x
theorem HasDerivAt.comp_hasFDerivWithinAt {π•œ : Type u} [NontriviallyNormedField π•œ] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {hβ‚‚ : π•œ' β†’ π•œ'} {hβ‚‚' : π•œ'} {f : E β†’ π•œ'} {f' : E β†’L[π•œ] π•œ'} {s : Set E} (x : E) (hh : HasDerivAt hβ‚‚ hβ‚‚' (f x)) (hf : HasFDerivWithinAt f f' s x) :
HasFDerivWithinAt (hβ‚‚ ∘ f) (hβ‚‚' β€’ f') s x
theorem HasDerivAt.comp_hasFDerivWithinAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {hβ‚‚ : π•œ' β†’ π•œ'} {hβ‚‚' : π•œ'} {y : π•œ'} {f : E β†’ π•œ'} {f' : E β†’L[π•œ] π•œ'} {s : Set E} (x : E) (hh : HasDerivAt hβ‚‚ hβ‚‚' y) (hf : HasFDerivWithinAt f f' s x) (hy : y = f x) :
HasFDerivWithinAt (hβ‚‚ ∘ f) (hβ‚‚' β€’ f') s x
theorem HasDerivWithinAt.comp_hasFDerivWithinAt {π•œ : Type u} [NontriviallyNormedField π•œ] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {hβ‚‚ : π•œ' β†’ π•œ'} {hβ‚‚' : π•œ'} {f : E β†’ π•œ'} {f' : E β†’L[π•œ] π•œ'} {s : Set E} {t : Set π•œ'} (x : E) (hh : HasDerivWithinAt hβ‚‚ hβ‚‚' t (f x)) (hf : HasFDerivWithinAt f f' s x) (hst : Set.MapsTo f s t) :
HasFDerivWithinAt (hβ‚‚ ∘ f) (hβ‚‚' β€’ f') s x
theorem HasDerivWithinAt.comp_hasFDerivWithinAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {hβ‚‚ : π•œ' β†’ π•œ'} {hβ‚‚' : π•œ'} {y : π•œ'} {f : E β†’ π•œ'} {f' : E β†’L[π•œ] π•œ'} {s : Set E} {t : Set π•œ'} (x : E) (hh : HasDerivWithinAt hβ‚‚ hβ‚‚' t y) (hf : HasFDerivWithinAt f f' s x) (hst : Set.MapsTo f s t) (hy : y = f x) :
HasFDerivWithinAt (hβ‚‚ ∘ f) (hβ‚‚' β€’ f') s x

Derivative of the composition of two scalar functions #

theorem HasDerivAtFilter.comp {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {L : Filter π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {h' : π•œ'} {hβ‚‚' : π•œ'} {L' : Filter π•œ'} (hhβ‚‚ : HasDerivAtFilter hβ‚‚ hβ‚‚' (h x) L') (hh : HasDerivAtFilter h h' x L) (hL : Filter.Tendsto h L L') :
HasDerivAtFilter (hβ‚‚ ∘ h) (hβ‚‚' * h') x L
theorem HasDerivAtFilter.comp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {L : Filter π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {h' : π•œ'} {hβ‚‚' : π•œ'} {L' : Filter π•œ'} {y : π•œ'} (hhβ‚‚ : HasDerivAtFilter hβ‚‚ hβ‚‚' y L') (hh : HasDerivAtFilter h h' x L) (hL : Filter.Tendsto h L L') (hy : y = h x) :
HasDerivAtFilter (hβ‚‚ ∘ h) (hβ‚‚' * h') x L
theorem HasDerivWithinAt.comp {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {s' : Set π•œ'} {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {h' : π•œ'} {hβ‚‚' : π•œ'} (hhβ‚‚ : HasDerivWithinAt hβ‚‚ hβ‚‚' s' (h x)) (hh : HasDerivWithinAt h h' s x) (hst : Set.MapsTo h s s') :
HasDerivWithinAt (hβ‚‚ ∘ h) (hβ‚‚' * h') s x
theorem HasDerivWithinAt.comp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {s' : Set π•œ'} {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {h' : π•œ'} {hβ‚‚' : π•œ'} {y : π•œ'} (hhβ‚‚ : HasDerivWithinAt hβ‚‚ hβ‚‚' s' y) (hh : HasDerivWithinAt h h' s x) (hst : Set.MapsTo h s s') (hy : y = h x) :
HasDerivWithinAt (hβ‚‚ ∘ h) (hβ‚‚' * h') s x
theorem HasDerivAt.comp {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {h' : π•œ'} {hβ‚‚' : π•œ'} (hhβ‚‚ : HasDerivAt hβ‚‚ hβ‚‚' (h x)) (hh : HasDerivAt h h' x) :
HasDerivAt (hβ‚‚ ∘ h) (hβ‚‚' * h') x

The chain rule.

Note that the function hβ‚‚ is a function on an algebra. If you are looking for the chain rule with hβ‚‚ taking values in a vector space, use HasDerivAt.scomp.

theorem HasDerivAt.comp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {h' : π•œ'} {hβ‚‚' : π•œ'} {y : π•œ'} (hhβ‚‚ : HasDerivAt hβ‚‚ hβ‚‚' y) (hh : HasDerivAt h h' x) (hy : y = h x) :
HasDerivAt (hβ‚‚ ∘ h) (hβ‚‚' * h') x

The chain rule.

Note that the function hβ‚‚ is a function on an algebra. If you are looking for the chain rule with hβ‚‚ taking values in a vector space, use HasDerivAt.scomp_of_eq.

theorem HasStrictDerivAt.comp {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {h' : π•œ'} {hβ‚‚' : π•œ'} (hhβ‚‚ : HasStrictDerivAt hβ‚‚ hβ‚‚' (h x)) (hh : HasStrictDerivAt h h' x) :
HasStrictDerivAt (hβ‚‚ ∘ h) (hβ‚‚' * h') x
theorem HasStrictDerivAt.comp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {h' : π•œ'} {hβ‚‚' : π•œ'} {y : π•œ'} (hhβ‚‚ : HasStrictDerivAt hβ‚‚ hβ‚‚' y) (hh : HasStrictDerivAt h h' x) (hy : y = h x) :
HasStrictDerivAt (hβ‚‚ ∘ h) (hβ‚‚' * h') x
theorem HasDerivAt.comp_hasDerivWithinAt {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {h' : π•œ'} {hβ‚‚' : π•œ'} (hhβ‚‚ : HasDerivAt hβ‚‚ hβ‚‚' (h x)) (hh : HasDerivWithinAt h h' s x) :
HasDerivWithinAt (hβ‚‚ ∘ h) (hβ‚‚' * h') s x
theorem HasDerivAt.comp_hasDerivWithinAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {h' : π•œ'} {hβ‚‚' : π•œ'} {y : π•œ'} (hhβ‚‚ : HasDerivAt hβ‚‚ hβ‚‚' y) (hh : HasDerivWithinAt h h' s x) (hy : y = h x) :
HasDerivWithinAt (hβ‚‚ ∘ h) (hβ‚‚' * h') s x
theorem derivWithin.comp {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {s' : Set π•œ'} {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} (hhβ‚‚ : DifferentiableWithinAt π•œ' hβ‚‚ s' (h x)) (hh : DifferentiableWithinAt π•œ h s x) (hs : Set.MapsTo h s s') (hxs : UniqueDiffWithinAt π•œ s x) :
derivWithin (hβ‚‚ ∘ h) s x = derivWithin hβ‚‚ s' (h x) * derivWithin h s x
theorem derivWithin.comp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {s : Set π•œ} {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {s' : Set π•œ'} {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {y : π•œ'} (hhβ‚‚ : DifferentiableWithinAt π•œ' hβ‚‚ s' y) (hh : DifferentiableWithinAt π•œ h s x) (hs : Set.MapsTo h s s') (hxs : UniqueDiffWithinAt π•œ s x) (hy : y = h x) :
derivWithin (hβ‚‚ ∘ h) s x = derivWithin hβ‚‚ s' (h x) * derivWithin h s x
theorem deriv.comp {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} (hhβ‚‚ : DifferentiableAt π•œ' hβ‚‚ (h x)) (hh : DifferentiableAt π•œ h x) :
deriv (hβ‚‚ ∘ h) x = deriv hβ‚‚ (h x) * deriv h x
theorem deriv.comp_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {π•œ' : Type u_1} [NontriviallyNormedField π•œ'] [NormedAlgebra π•œ π•œ'] {h : π•œ β†’ π•œ'} {hβ‚‚ : π•œ' β†’ π•œ'} {y : π•œ'} (hhβ‚‚ : DifferentiableAt π•œ' hβ‚‚ y) (hh : DifferentiableAt π•œ h x) (hy : y = h x) :
deriv (hβ‚‚ ∘ h) x = deriv hβ‚‚ (h x) * deriv h x
theorem HasDerivAtFilter.iterate {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {L : Filter π•œ} {f : π•œ β†’ π•œ} {f' : π•œ} (hf : HasDerivAtFilter f f' x L) (hL : Filter.Tendsto f L L) (hx : f x = x) (n : β„•) :
HasDerivAtFilter f^[n] (f' ^ n) x L
theorem HasDerivAt.iterate {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {f : π•œ β†’ π•œ} {f' : π•œ} (hf : HasDerivAt f f' x) (hx : f x = x) (n : β„•) :
HasDerivAt f^[n] (f' ^ n) x
theorem HasDerivWithinAt.iterate {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {s : Set π•œ} {f : π•œ β†’ π•œ} {f' : π•œ} (hf : HasDerivWithinAt f f' s x) (hx : f x = x) (hs : Set.MapsTo f s s) (n : β„•) :
HasDerivWithinAt f^[n] (f' ^ n) s x
theorem HasStrictDerivAt.iterate {π•œ : Type u} [NontriviallyNormedField π•œ] (x : π•œ) {f : π•œ β†’ π•œ} {f' : π•œ} (hf : HasStrictDerivAt f f' x) (hx : f x = x) (n : β„•) :

Derivative of the composition of a function between vector spaces and a function on π•œ #

theorem HasFDerivWithinAt.comp_hasDerivWithinAt {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} {f' : F} (x : π•œ) {s : Set π•œ} {l : F β†’ E} {l' : F β†’L[π•œ] E} {t : Set F} (hl : HasFDerivWithinAt l l' t (f x)) (hf : HasDerivWithinAt f f' s x) (hst : Set.MapsTo f s t) :
HasDerivWithinAt (l ∘ f) (l' f') s x

The composition l ∘ f where l : F β†’ E and f : π•œ β†’ F, has a derivative within a set equal to the FrΓ©chet derivative of l applied to the derivative of f.

theorem HasFDerivWithinAt.comp_hasDerivWithinAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} {f' : F} (x : π•œ) {s : Set π•œ} {l : F β†’ E} {l' : F β†’L[π•œ] E} {y : F} {t : Set F} (hl : HasFDerivWithinAt l l' t y) (hf : HasDerivWithinAt f f' s x) (hst : Set.MapsTo f s t) (hy : y = f x) :
HasDerivWithinAt (l ∘ f) (l' f') s x

The composition l ∘ f where l : F β†’ E and f : π•œ β†’ F, has a derivative within a set equal to the FrΓ©chet derivative of l applied to the derivative of f.

theorem HasFDerivAt.comp_hasDerivWithinAt {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} {f' : F} (x : π•œ) {s : Set π•œ} {l : F β†’ E} {l' : F β†’L[π•œ] E} (hl : HasFDerivAt l l' (f x)) (hf : HasDerivWithinAt f f' s x) :
HasDerivWithinAt (l ∘ f) (l' f') s x
theorem HasFDerivAt.comp_hasDerivWithinAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} {f' : F} (x : π•œ) {s : Set π•œ} {l : F β†’ E} {l' : F β†’L[π•œ] E} {y : F} (hl : HasFDerivAt l l' y) (hf : HasDerivWithinAt f f' s x) (hy : y = f x) :
HasDerivWithinAt (l ∘ f) (l' f') s x
theorem HasFDerivAt.comp_hasDerivAt {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} {f' : F} (x : π•œ) {l : F β†’ E} {l' : F β†’L[π•œ] E} (hl : HasFDerivAt l l' (f x)) (hf : HasDerivAt f f' x) :
HasDerivAt (l ∘ f) (l' f') x

The composition l ∘ f where l : F β†’ E and f : π•œ β†’ F, has a derivative equal to the FrΓ©chet derivative of l applied to the derivative of f.

theorem HasFDerivAt.comp_hasDerivAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} {f' : F} (x : π•œ) {l : F β†’ E} {l' : F β†’L[π•œ] E} {y : F} (hl : HasFDerivAt l l' y) (hf : HasDerivAt f f' x) (hy : y = f x) :
HasDerivAt (l ∘ f) (l' f') x

The composition l ∘ f where l : F β†’ E and f : π•œ β†’ F, has a derivative equal to the FrΓ©chet derivative of l applied to the derivative of f.

theorem HasStrictFDerivAt.comp_hasStrictDerivAt {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} {f' : F} (x : π•œ) {l : F β†’ E} {l' : F β†’L[π•œ] E} (hl : HasStrictFDerivAt l l' (f x)) (hf : HasStrictDerivAt f f' x) :
HasStrictDerivAt (l ∘ f) (l' f') x
theorem HasStrictFDerivAt.comp_hasStrictDerivAt_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} {f' : F} (x : π•œ) {l : F β†’ E} {l' : F β†’L[π•œ] E} {y : F} (hl : HasStrictFDerivAt l l' y) (hf : HasStrictDerivAt f f' x) (hy : y = f x) :
HasStrictDerivAt (l ∘ f) (l' f') x
theorem fderivWithin.comp_derivWithin {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} (x : π•œ) {s : Set π•œ} {l : F β†’ E} {t : Set F} (hl : DifferentiableWithinAt π•œ l t (f x)) (hf : DifferentiableWithinAt π•œ f s x) (hs : Set.MapsTo f s t) (hxs : UniqueDiffWithinAt π•œ s x) :
derivWithin (l ∘ f) s x = (fderivWithin π•œ l t (f x)) (derivWithin f s x)
theorem fderivWithin.comp_derivWithin_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} (x : π•œ) {s : Set π•œ} {l : F β†’ E} {y : F} {t : Set F} (hl : DifferentiableWithinAt π•œ l t y) (hf : DifferentiableWithinAt π•œ f s x) (hs : Set.MapsTo f s t) (hxs : UniqueDiffWithinAt π•œ s x) (hy : y = f x) :
derivWithin (l ∘ f) s x = (fderivWithin π•œ l t (f x)) (derivWithin f s x)
theorem fderiv.comp_deriv {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} (x : π•œ) {l : F β†’ E} (hl : DifferentiableAt π•œ l (f x)) (hf : DifferentiableAt π•œ f x) :
deriv (l ∘ f) x = (fderiv π•œ l (f x)) (deriv f x)
theorem fderiv.comp_deriv_of_eq {π•œ : Type u} [NontriviallyNormedField π•œ] {F : Type v} [NormedAddCommGroup F] [NormedSpace π•œ F] {E : Type w} [NormedAddCommGroup E] [NormedSpace π•œ E] {f : π•œ β†’ F} (x : π•œ) {l : F β†’ E} {y : F} (hl : DifferentiableAt π•œ l y) (hf : DifferentiableAt π•œ f x) (hy : y = f x) :
deriv (l ∘ f) x = (fderiv π•œ l (f x)) (deriv f x)