# One-dimensional derivatives of compositions of functions #

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

• HasDerivAt.comp etc: f : π' β π' composed with g : π β π';
• HasDerivAt.scomp etc: f : π' β E composed with g : π β π';
• HasFDerivAt.comp_hasDerivAt etc: f : E β F composed with g : π β E;

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} [] {F : Type v} [NormedSpace π F] (x : π) {L : Filter π} {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {L : Filter π} {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {π' : Type u_1} [] [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} [] {F : Type v} [NormedSpace π F] (x : π) {π' : Type u_1} [] [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} [] {E : Type w} [NormedSpace π E] {π' : Type u_1} [] [NormedAlgebra π π'] {hβ : π' β π'} {hβ' : π'} {L' : Filter π'} {f : E β π'} {f' : E βL[π] π'} (x : E) {L'' : } (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} [] {E : Type w} [NormedSpace π E] {π' : Type u_1} [] [NormedAlgebra π π'] {hβ : π' β π'} {hβ' : π'} {L' : Filter π'} {y : π'} {f : E β π'} {f' : E βL[π] π'} (x : E) {L'' : } (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} [] {E : Type w} [NormedSpace π E] {π' : Type u_1} [] [NormedAlgebra π π'] {hβ : π' β π'} {hβ' : π'} {f : E β π'} {f' : E βL[π] π'} (x : E) (hh : HasStrictDerivAt hβ hβ' (f x)) (hf : ) :
HasStrictFDerivAt (hβ β f) (hβ' β’ f') x
theorem HasStrictDerivAt.comp_hasStrictFDerivAt_of_eq {π : Type u} [] {E : Type w} [NormedSpace π E] {π' : Type u_1} [] [NormedAlgebra π π'] {hβ : π' β π'} {hβ' : π'} {y : π'} {f : E β π'} {f' : E βL[π] π'} (x : E) (hh : HasStrictDerivAt hβ hβ' y) (hf : ) (hy : y = f x) :
HasStrictFDerivAt (hβ β f) (hβ' β’ f') x
theorem HasDerivAt.comp_hasFDerivAt {π : Type u} [] {E : Type w} [NormedSpace π E] {π' : Type u_1} [] [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} [] {E : Type w} [NormedSpace π E] {π' : Type u_1} [] [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} [] {E : Type w} [NormedSpace π E] {π' : Type u_1} [] [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} [] {E : Type w} [NormedSpace π E] {π' : Type u_1} [] [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} [] {E : Type w} [NormedSpace π E] {π' : Type u_1} [] [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} [] {E : Type w} [NormedSpace π E] {π' : Type u_1} [] [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} [] (x : π) {L : Filter π} {π' : Type u_1} [] [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} [] (x : π) {L : Filter π} {π' : Type u_1} [] [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} [] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] (x : π) {π' : Type u_1} [] [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} [] (x : π) {π' : Type u_1} [] [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} [] (x : π) {π' : Type u_1} [] [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} [] (x : π) {π' : Type u_1} [] [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} [] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] (x : π) {s : Set π} {π' : Type u_1} [] [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} [] (x : π) {π' : Type u_1} [] [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} [] (x : π) {π' : Type u_1} [] [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} [] (x : π) {L : Filter π} {f : π β π} {f' : π} (hf : HasDerivAtFilter f f' x L) (hL : ) (hx : f x = x) (n : β) :
HasDerivAtFilter f^[n] (f' ^ n) x L
theorem HasDerivAt.iterate {π : Type u} [] (x : π) {f : π β π} {f' : π} (hf : HasDerivAt f f' x) (hx : f x = x) (n : β) :
HasDerivAt f^[n] (f' ^ n) x
theorem HasDerivWithinAt.iterate {π : Type u} [] (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} [] (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} [] {F : Type v} [NormedSpace π F] {E : Type w} [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} [] {F : Type v} [NormedSpace π F] {E : Type w} [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} [] {F : Type v} [NormedSpace π F] {E : Type w} [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} [] {F : Type v} [NormedSpace π F] {E : Type w} [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} [] {F : Type v} [NormedSpace π F] {E : Type w} [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} [] {F : Type v} [NormedSpace π F] {E : Type w} [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} [] {F : Type v} [NormedSpace π F] {E : Type w} [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} [] {F : Type v} [NormedSpace π F] {E : Type w} [NormedSpace π E] {f : π β F} {f' : F} (x : π) {l : F β E} {l' : F βL[π] E} {y : F} (hl : ) (hf : HasStrictDerivAt f f' x) (hy : y = f x) :
HasStrictDerivAt (l β f) (l' f') x
theorem fderivWithin.comp_derivWithin {π : Type u} [] {F : Type v} [NormedSpace π F] {E : Type w} [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} [] {F : Type v} [NormedSpace π F] {E : Type w} [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} [] {F : Type v} [NormedSpace π F] {E : Type w} [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} [] {F : Type v} [NormedSpace π F] {E : Type w} [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)