# mathlibdocumentation

analysis.calculus.deriv

# One-dimensional derivatives

This file defines the derivative of a function f : π β F where π is a normed field and F is a normed space over this field. The derivative of such a function f at a point x is given by an element f' : F.

The theory is developed analogously to the FrΓ©chet derivatives. We first introduce predicates defined in terms of the corresponding predicates for FrΓ©chet derivatives:

• has_deriv_at_filter f f' x L states that the function f has the derivative f' at the point x as x goes along the filter L.

• has_deriv_within_at f f' s x states that the function f has the derivative f' at the point x within the subset s.

• has_deriv_at f f' x states that the function f has the derivative f' at the point x.

• has_strict_deriv_at f f' x states that the function f has the derivative f' at the point x in the sense of strict differentiability, i.e., f y - f z = (y - z) β’ f' + o (y - z) as y, z β x.

For the last two notions we also define a functional version:

• deriv_within f s x is a derivative of f at x within s. If the derivative does not exist, then deriv_within f s x equals zero.

• deriv f x is a derivative of f at x. If the derivative does not exist, then deriv f x equals zero.

The theorems fderiv_within_deriv_within and fderiv_deriv show that the one-dimensional derivatives coincide with the general FrΓ©chet derivatives.

We also show the existence and compute the derivatives of:

• constants
• the identity function
• linear maps
• sum of finitely many functions
• negation
• subtraction
• multiplication
• inverse x β xβ»ΒΉ
• multiplication of two functions in π β π
• multiplication of a function in π β π and of a function in π β E
• composition of a function in π β F with a function in π β π
• composition of a function in F β E with a function in π β F
• inverse function (assuming that it exists; the inverse function theorem is in inverse.lean)
• division
• polynomials

For most binary operations we also define const_op and op_const theorems for the cases when the first or second argument is a constant. This makes writing chains of has_deriv_at's easier, and they more frequently lead to the desired result.

We set up the simplifier so that it can compute the derivative of simple functions. For instance,

example (x : β) : deriv (Ξ» x, cos (sin x) * exp x) x = (cos(sin(x))-sin(sin(x))*cos(x))*exp(x) :=
by { simp, ring }

## Implementation notes

Most of the theorems are direct restatements of the corresponding theorems for FrΓ©chet derivatives.

The strategy to construct simp lemmas that give the simplifier the possibility to compute derivatives is the same as the one for differentiability statements, as explained in fderiv.lean. See the explanations there.

def has_deriv_at_filter {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] :
(π β F) β F β π β filter π β Prop

f has the derivative f' at the point x as x goes along the filter L.

That is, f x' = f x + (x' - x) β’ f' + o(x' - x) where x' converges along the filter L.

Equations
def has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] :
(π β F) β F β set π β π β Prop

f has the derivative f' at the point x within the subset s.

That is, f x' = f x + (x' - x) β’ f' + o(x' - x) where x' converges to x inside s.

Equations
def has_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] :
(π β F) β F β π β Prop

f has the derivative f' at the point x.

That is, f x' = f x + (x' - x) β’ f' + o(x' - x) where x' converges to x.

Equations
def has_strict_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] :
(π β F) β F β π β Prop

f has the derivative f' at the point x in the sense of strict differentiability.

That is, f y - f z = (y - z) β’ f' + o(y - z) as y, z β x.

Equations
def deriv_within {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] :
(π β F) β set π β π β F

Derivative of f at the point x within the set s, if it exists. Zero otherwise.

If the derivative exists (i.e., β f', has_deriv_within_at f f' s x), then f x' = f x + (x' - x) β’ deriv_within f s x + o(x' - x) where x' converges to x inside s.

Equations
def deriv {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] :
(π β F) β π β F

Derivative of f at the point x, if it exists. Zero otherwise.

If the derivative exists (i.e., β f', has_deriv_at f f' x), then f x' = f x + (x' - x) β’ deriv f x + o(x' - x) where x' converges to x.

Equations
theorem has_fderiv_at_filter_iff_has_deriv_at_filter {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {L : filter π} {f' : π βL[π] F} :
x L β (βf' 1) x L

Expressing has_fderiv_at_filter f f' x L in terms of has_deriv_at_filter

theorem has_fderiv_at_filter.has_deriv_at_filter {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {L : filter π} {f' : π βL[π] F} :
x L β (βf' 1) x L

theorem has_fderiv_within_at_iff_has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} {f' : π βL[π] F} :
s x β (βf' 1) s x

Expressing has_fderiv_within_at f f' s x in terms of has_deriv_within_at

theorem has_deriv_within_at_iff_has_fderiv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} {f' : F} :
s x β (1.smul_right f') s x

Expressing has_deriv_within_at f f' s x in terms of has_fderiv_within_at

theorem has_fderiv_within_at.has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} {f' : π βL[π] F} :
s x β (βf' 1) s x

theorem has_deriv_within_at.has_fderiv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} {f' : F} :
s x β (1.smul_right f') s x

theorem has_fderiv_at_iff_has_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {f' : π βL[π] F} :
f' x β (βf' 1) x

Expressing has_fderiv_at f f' x in terms of has_deriv_at

theorem has_fderiv_at.has_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {f' : π βL[π] F} :
f' x β (βf' 1) x

theorem has_strict_fderiv_at_iff_has_strict_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {f' : π βL[π] F} :
x β (βf' 1) x

theorem has_strict_fderiv_at.has_strict_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {f' : π βL[π] F} :
x β (βf' 1) x

theorem has_deriv_at_iff_has_fderiv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {f' : F} :
f' x β (1.smul_right f') x

Expressing has_deriv_at f f' x in terms of has_fderiv_at

theorem deriv_within_zero_of_not_differentiable_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} :
Β¬ f s x β s x = 0

theorem deriv_zero_of_not_differentiable_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} :
Β¬ f x β x = 0

theorem unique_diff_within_at.eq_deriv {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' fβ' : F} {x : π} (s : set π) :
s x β s x β fβ' s x β f' = fβ'

theorem has_deriv_at_filter_iff_tendsto {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {L : filter π} :
x L β filter.tendsto (Ξ» (x' : π), β₯x' - xβ₯β»ΒΉ * β₯f x' - f x - (x' - x) β’ f'β₯) L (π 0)

theorem has_deriv_within_at_iff_tendsto {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} :
s x β filter.tendsto (Ξ» (x' : π), β₯x' - xβ₯β»ΒΉ * β₯f x' - f x - (x' - x) β’ f'β₯) (π[s] x) (π 0)

theorem has_deriv_at_iff_tendsto {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} :
f' x β filter.tendsto (Ξ» (x' : π), β₯x' - xβ₯β»ΒΉ * β₯f x' - f x - (x' - x) β’ f'β₯) (π x) (π 0)

theorem has_strict_deriv_at.has_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} :
x β f' x

theorem has_deriv_at_filter_iff_tendsto_slope {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {L : filter π} :
x L β filter.tendsto (Ξ» (y : π), (y - x)β»ΒΉ β’ (f y - f x)) (L β π {x}αΆ) (π f')

If the domain has dimension one, then FrΓ©chet derivative is equivalent to the classical definition with a limit. In this version we have to take the limit along the subset -{x}, because for y=x the slope equals zero due to the convention 0β»ΒΉ=0.

theorem has_deriv_within_at_iff_tendsto_slope {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} :
s x β filter.tendsto (Ξ» (y : π), (y - x)β»ΒΉ β’ (f y - f x)) (π[s \ {x}] x) (π f')

theorem has_deriv_within_at_iff_tendsto_slope' {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} :
x β s β f' s x β filter.tendsto (Ξ» (y : π), (y - x)β»ΒΉ β’ (f y - f x)) (π[s] x) (π f'))

theorem has_deriv_at_iff_tendsto_slope {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} :
f' x β filter.tendsto (Ξ» (y : π), (y - x)β»ΒΉ β’ (f y - f x)) (π[{x}αΆ] x) (π f')

theorem has_deriv_at_iff_is_o_nhds_zero {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} :
f' x β asymptotics.is_o (Ξ» (h : π), f (x + h) - f x - h β’ f') (Ξ» (h : π), h) (π 0)

theorem has_deriv_at_filter.mono {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {Lβ Lβ : filter π} :
x Lβ β Lβ β€ Lβ β x Lβ

theorem has_deriv_within_at.mono {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s t : set π} :
t x β s β t β s x

theorem has_deriv_at.has_deriv_at_filter {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {L : filter π} :
f' x β L β€ π x β x L

theorem has_deriv_at.has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} :
f' x β s x

theorem has_deriv_within_at.differentiable_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} :
s x β f s x

theorem has_deriv_at.differentiable_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} :
f' x β f x

@[simp]
theorem has_deriv_within_at_univ {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} :
x β f' x

theorem has_deriv_at_unique {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {fβ' fβ' : F} {x : π} :
fβ' x β fβ' x β fβ' = fβ'

theorem has_deriv_within_at_inter' {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s t : set π} :
t β π[s] x β f' (s β© t) x β s x)

theorem has_deriv_within_at_inter {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s t : set π} :
t β π x β f' (s β© t) x β s x)

theorem has_deriv_within_at.union {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s t : set π} :
s x β t x β (s βͺ t) x

theorem has_deriv_within_at.nhds_within {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s t : set π} :
s x β s β π[t] x β t x

theorem has_deriv_within_at.has_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} :
s x β s β π x β f' x

theorem differentiable_within_at.has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} :
f s x β s x) s x

theorem differentiable_at.has_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} :
f x β (deriv f x) x

theorem has_deriv_at.deriv {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} :
f' x β x = f'

theorem has_deriv_within_at.deriv_within {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} :
s x β s x β s x = f'

theorem fderiv_within_deriv_within {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} :
β(fderiv_within π f s x) 1 = s x

theorem deriv_within_fderiv_within {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} :
1.smul_right s x) = fderiv_within π f s x

theorem fderiv_deriv {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} :
β(fderiv π f x) 1 = x

theorem deriv_fderiv {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} :
1.smul_right (deriv f x) = fderiv π f x

theorem differentiable_at.deriv_within {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} :
f x β s x β s x = x

theorem deriv_within_subset {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s t : set π} :
s β t β s x β f t x β s x = t x

@[simp]
theorem deriv_within_univ {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} :

theorem deriv_within_inter {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s t : set π} :
t β π x β s x β (s β© t) x = s x

theorem deriv_within_of_open {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} :
β x β s β s x = x

### Congruence properties of derivatives

theorem filter.eventually_eq.has_deriv_at_filter_iff {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {fβ fβ : π β F} {fβ' fβ' : F} {x : π} {L : filter π} :
fβ =αΆ [L] fβ β fβ x = fβ x β fβ' = fβ' β (has_deriv_at_filter fβ fβ' x L β fβ' x L)

theorem has_deriv_at_filter.congr_of_eventually_eq {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f fβ : π β F} {f' : F} {x : π} {L : filter π} :
x L β fβ =αΆ [L] f β fβ x = f x β f' x L

theorem has_deriv_within_at.congr_mono {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f fβ : π β F} {f' : F} {x : π} {s t : set π} :
s x β (β (x : π), x β t β fβ x = f x) β fβ x = f x β t β s β f' t x

theorem has_deriv_within_at.congr {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f fβ : π β F} {f' : F} {x : π} {s : set π} :
s x β (β (x : π), x β s β fβ x = f x) β fβ x = f x β f' s x

theorem has_deriv_within_at.congr_of_eventually_eq {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f fβ : π β F} {f' : F} {x : π} {s : set π} :
s x β fβ =αΆ [π[s] x] f β fβ x = f x β f' s x

theorem has_deriv_at.congr_of_eventually_eq {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f fβ : π β F} {f' : F} {x : π} :
f' x β fβ =αΆ [π x] f β has_deriv_at fβ f' x

theorem filter.eventually_eq.deriv_within_eq {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f fβ : π β F} {x : π} {s : set π} :
s x β fβ =αΆ [π[s] x] f β fβ x = f x β deriv_within fβ s x = s x

theorem deriv_within_congr {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f fβ : π β F} {x : π} {s : set π} :
s x β (β (y : π), y β s β fβ y = f y) β fβ x = f x β deriv_within fβ s x = s x

theorem filter.eventually_eq.deriv_eq {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f fβ : π β F} {x : π} :
fβ =αΆ [π x] f β deriv fβ x = x

### Derivative of the identity

theorem has_deriv_at_filter_id {π : Type u} [nondiscrete_normed_field π] (x : π) (L : filter π) :
L

theorem has_deriv_within_at_id {π : Type u} [nondiscrete_normed_field π] (x : π) (s : set π) :
x

theorem has_deriv_at_id {π : Type u} [nondiscrete_normed_field π] (x : π) :
x

theorem has_deriv_at_id' {π : Type u} [nondiscrete_normed_field π] (x : π) :
has_deriv_at (Ξ» (x : π), x) 1 x

theorem has_strict_deriv_at_id {π : Type u} [nondiscrete_normed_field π] (x : π) :

theorem deriv_id {π : Type u} [nondiscrete_normed_field π] (x : π) :
x = 1

@[simp]
theorem deriv_id' {π : Type u} [nondiscrete_normed_field π] :
= Ξ» (_x : π), 1

@[simp]
theorem deriv_id'' {π : Type u} [nondiscrete_normed_field π] (x : π) :
deriv (Ξ» (x : π), x) x = 1

theorem deriv_within_id {π : Type u} [nondiscrete_normed_field π] (x : π) (s : set π) :
s x β x = 1

### Derivative of constant functions

theorem has_deriv_at_filter_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] (x : π) (L : filter π) (c : F) :
has_deriv_at_filter (Ξ» (x : π), c) 0 x L

theorem has_strict_deriv_at_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] (x : π) (c : F) :
has_strict_deriv_at (Ξ» (x : π), c) 0 x

theorem has_deriv_within_at_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] (x : π) (s : set π) (c : F) :
has_deriv_within_at (Ξ» (x : π), c) 0 s x

theorem has_deriv_at_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] (x : π) (c : F) :
has_deriv_at (Ξ» (x : π), c) 0 x

theorem deriv_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] (x : π) (c : F) :
deriv (Ξ» (x : π), c) x = 0

@[simp]
theorem deriv_const' {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] (c : F) :
deriv (Ξ» (x : π), c) = Ξ» (x : π), 0

theorem deriv_within_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] (x : π) (s : set π) (c : F) :
s x β deriv_within (Ξ» (x : π), c) s x = 0

### Derivative of continuous linear maps

theorem continuous_linear_map.has_deriv_at_filter {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {L : filter π} (e : π βL[π] F) :
(βe 1) x L

theorem continuous_linear_map.has_strict_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} (e : π βL[π] F) :
(βe 1) x

theorem continuous_linear_map.has_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} (e : π βL[π] F) :
(βe 1) x

theorem continuous_linear_map.has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {s : set π} (e : π βL[π] F) :
(βe 1) s x

@[simp]
theorem continuous_linear_map.deriv {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} (e : π βL[π] F) :
x = βe 1

theorem continuous_linear_map.deriv_within {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {s : set π} (e : π βL[π] F) :
s x β x = βe 1

### Derivative of bundled linear maps

theorem linear_map.has_deriv_at_filter {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {L : filter π} (e : π ββ[π] F) :
(βe 1) x L

theorem linear_map.has_strict_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} (e : π ββ[π] F) :
(βe 1) x

theorem linear_map.has_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} (e : π ββ[π] F) :
(βe 1) x

theorem linear_map.has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {s : set π} (e : π ββ[π] F) :
(βe 1) s x

@[simp]
theorem linear_map.deriv {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} (e : π ββ[π] F) :
x = βe 1

theorem linear_map.deriv_within {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {s : set π} (e : π ββ[π] F) :
s x β x = βe 1

### Derivative of the sum of two functions

theorem has_deriv_at_filter.add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {f' g' : F} {x : π} {L : filter π} :
x L β x L β has_deriv_at_filter (Ξ» (y : π), f y + g y) (f' + g') x L

theorem has_strict_deriv_at.add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {f' g' : F} {x : π} :
x β x β has_strict_deriv_at (Ξ» (y : π), f y + g y) (f' + g') x

theorem has_deriv_within_at.add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {f' g' : F} {x : π} {s : set π} :
s x β s x β has_deriv_within_at (Ξ» (y : π), f y + g y) (f' + g') s x

theorem has_deriv_at.add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {f' g' : F} {x : π} :
f' x β g' x β has_deriv_at (Ξ» (x : π), f x + g x) (f' + g') x

theorem deriv_within_add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {x : π} {s : set π} :
s x β f s x β g s x β deriv_within (Ξ» (y : π), f y + g y) s x = s x + s x

@[simp]
theorem deriv_add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {x : π} :
f x β g x β deriv (Ξ» (y : π), f y + g y) x = x + x

theorem has_deriv_at_filter.add_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {L : filter π} (hf : x L) (c : F) :
has_deriv_at_filter (Ξ» (y : π), f y + c) f' x L

theorem has_deriv_within_at.add_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} (hf : s x) (c : F) :
has_deriv_within_at (Ξ» (y : π), f y + c) f' s x

theorem has_deriv_at.add_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} (hf : f' x) (c : F) :
has_deriv_at (Ξ» (x : π), f x + c) f' x

theorem deriv_within_add_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} (hxs : s x) (hf : f s x) (c : F) :
deriv_within (Ξ» (y : π), f y + c) s x = s x

theorem deriv_add_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} (hf : f x) (c : F) :
deriv (Ξ» (y : π), f y + c) x = x

theorem has_deriv_at_filter.const_add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {L : filter π} (c : F) :
x L β has_deriv_at_filter (Ξ» (y : π), c + f y) f' x L

theorem has_deriv_within_at.const_add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} (c : F) :
s x β has_deriv_within_at (Ξ» (y : π), c + f y) f' s x

theorem has_deriv_at.const_add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} (c : F) :
f' x β has_deriv_at (Ξ» (x : π), c + f x) f' x

theorem deriv_within_const_add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} (hxs : s x) (c : F) :
f s x β deriv_within (Ξ» (y : π), c + f y) s x = s x

theorem deriv_const_add {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} (c : F) :
f x β deriv (Ξ» (y : π), c + f y) x = x

### Derivative of a finite sum of functions

theorem has_deriv_at_filter.sum {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {L : filter π} {ΞΉ : Type u_1} {u : finset ΞΉ} {A : ΞΉ β π β F} {A' : ΞΉ β F} :
(β (i : ΞΉ), i β u β has_deriv_at_filter (A i) (A' i) x L) β has_deriv_at_filter (Ξ» (y : π), β (i : ΞΉ) in u, A i y) (β (i : ΞΉ) in u, A' i) x L

theorem has_strict_deriv_at.sum {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {ΞΉ : Type u_1} {u : finset ΞΉ} {A : ΞΉ β π β F} {A' : ΞΉ β F} :
(β (i : ΞΉ), i β u β has_strict_deriv_at (A i) (A' i) x) β has_strict_deriv_at (Ξ» (y : π), β (i : ΞΉ) in u, A i y) (β (i : ΞΉ) in u, A' i) x

theorem has_deriv_within_at.sum {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {s : set π} {ΞΉ : Type u_1} {u : finset ΞΉ} {A : ΞΉ β π β F} {A' : ΞΉ β F} :
(β (i : ΞΉ), i β u β has_deriv_within_at (A i) (A' i) s x) β has_deriv_within_at (Ξ» (y : π), β (i : ΞΉ) in u, A i y) (β (i : ΞΉ) in u, A' i) s x

theorem has_deriv_at.sum {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {ΞΉ : Type u_1} {u : finset ΞΉ} {A : ΞΉ β π β F} {A' : ΞΉ β F} :
(β (i : ΞΉ), i β u β has_deriv_at (A i) (A' i) x) β has_deriv_at (Ξ» (y : π), β (i : ΞΉ) in u, A i y) (β (i : ΞΉ) in u, A' i) x

theorem deriv_within_sum {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {s : set π} {ΞΉ : Type u_1} {u : finset ΞΉ} {A : ΞΉ β π β F} :
s x β (β (i : ΞΉ), i β u β (A i) s x) β deriv_within (Ξ» (y : π), β (i : ΞΉ) in u, A i y) s x = β (i : ΞΉ) in u, deriv_within (A i) s x

@[simp]
theorem deriv_sum {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {ΞΉ : Type u_1} {u : finset ΞΉ} {A : ΞΉ β π β F} :
(β (i : ΞΉ), i β u β (A i) x) β deriv (Ξ» (y : π), β (i : ΞΉ) in u, A i y) x = β (i : ΞΉ) in u, deriv (A i) x

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

theorem has_deriv_within_at.smul {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} {c : π β π} {c' : π} :
s x β s x β has_deriv_within_at (Ξ» (y : π), c y β’ f y) (c x β’ f' + c' β’ f x) s x

theorem has_deriv_at.smul {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {c : π β π} {c' : π} :
c' x β f' x β has_deriv_at (Ξ» (y : π), c y β’ f y) (c x β’ f' + c' β’ f x) x

theorem has_strict_deriv_at.smul {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {c : π β π} {c' : π} :
x β x β has_strict_deriv_at (Ξ» (y : π), c y β’ f y) (c x β’ f' + c' β’ f x) x

theorem deriv_within_smul {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} {c : π β π} :
s x β c s x β f s x β deriv_within (Ξ» (y : π), c y β’ f y) s x = c x β’ s x + s x β’ f x

theorem deriv_smul {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {c : π β π} :
c x β f x β deriv (Ξ» (y : π), c y β’ f y) x = c x β’ x + x β’ f x

theorem has_deriv_within_at.smul_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {s : set π} {c : π β π} {c' : π} (hc : s x) (f : F) :
has_deriv_within_at (Ξ» (y : π), c y β’ f) (c' β’ f) s x

theorem has_deriv_at.smul_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {c : π β π} {c' : π} (hc : c' x) (f : F) :
has_deriv_at (Ξ» (y : π), c y β’ f) (c' β’ f) x

theorem deriv_within_smul_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {s : set π} {c : π β π} (hxs : s x) (hc : c s x) (f : F) :
deriv_within (Ξ» (y : π), c y β’ f) s x = s x β’ f

theorem deriv_smul_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {x : π} {c : π β π} (hc : c x) (f : F) :
deriv (Ξ» (y : π), c y β’ f) x = x β’ f

theorem has_deriv_within_at.const_smul {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} (c : π) :
s x β has_deriv_within_at (Ξ» (y : π), c β’ f y) (c β’ f') s x

theorem has_deriv_at.const_smul {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} (c : π) :
f' x β has_deriv_at (Ξ» (y : π), c β’ f y) (c β’ f') x

theorem deriv_within_const_smul {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} (hxs : s x) (c : π) :
f s x β deriv_within (Ξ» (y : π), c β’ f y) s x = c β’ s x

theorem deriv_const_smul {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} (c : π) :
f x β deriv (Ξ» (y : π), c β’ f y) x = c β’ x

### Derivative of the negative of a function

theorem has_deriv_at_filter.neg {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {L : filter π} :
x L β has_deriv_at_filter (Ξ» (x : π), -f x) (-f') x L

theorem has_deriv_within_at.neg {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} :
s x β has_deriv_within_at (Ξ» (x : π), -f x) (-f') s x

theorem has_deriv_at.neg {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} :
f' x β has_deriv_at (Ξ» (x : π), -f x) (-f') x

theorem has_strict_deriv_at.neg {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} :
x β has_strict_deriv_at (Ξ» (x : π), -f x) (-f') x

theorem deriv_within.neg {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} :
s x β f s x β deriv_within (Ξ» (y : π), -f y) s x = - s x

theorem deriv.neg {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} :
deriv (Ξ» (y : π), -f y) x = - x

@[simp]
theorem deriv.neg' {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} :
deriv (Ξ» (y : π), -f y) = Ξ» (x : π), - x

### Derivative of the negation function (i.e has_neg.neg)

theorem has_deriv_at_filter_neg {π : Type u} [nondiscrete_normed_field π] (x : π) (L : filter π) :
L

theorem has_deriv_within_at_neg {π : Type u} [nondiscrete_normed_field π] (x : π) (s : set π) :
x

theorem has_deriv_at_neg {π : Type u} [nondiscrete_normed_field π] (x : π) :
x

theorem has_deriv_at_neg' {π : Type u} [nondiscrete_normed_field π] (x : π) :
has_deriv_at (Ξ» (x : π), -x) (-1) x

theorem has_strict_deriv_at_neg {π : Type u} [nondiscrete_normed_field π] (x : π) :

theorem deriv_neg {π : Type u} [nondiscrete_normed_field π] (x : π) :
= -1

@[simp]
theorem deriv_neg' {π : Type u} [nondiscrete_normed_field π] :
= Ξ» (_x : π), -1

@[simp]
theorem deriv_neg'' {π : Type u} [nondiscrete_normed_field π] (x : π) :
deriv (Ξ» (x : π), -x) x = -1

theorem deriv_within_neg {π : Type u} [nondiscrete_normed_field π] (x : π) (s : set π) :
s x β = -1

theorem differentiable_neg {π : Type u} [nondiscrete_normed_field π] :

theorem differentiable_on_neg {π : Type u} [nondiscrete_normed_field π] (s : set π) :
s

### Derivative of the difference of two functions

theorem has_deriv_at_filter.sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {f' g' : F} {x : π} {L : filter π} :
x L β x L β has_deriv_at_filter (Ξ» (x : π), f x - g x) (f' - g') x L

theorem has_deriv_within_at.sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {f' g' : F} {x : π} {s : set π} :
s x β s x β has_deriv_within_at (Ξ» (x : π), f x - g x) (f' - g') s x

theorem has_deriv_at.sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {f' g' : F} {x : π} :
f' x β g' x β has_deriv_at (Ξ» (x : π), f x - g x) (f' - g') x

theorem has_strict_deriv_at.sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {f' g' : F} {x : π} :
x β x β has_strict_deriv_at (Ξ» (x : π), f x - g x) (f' - g') x

theorem deriv_within_sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {x : π} {s : set π} :
s x β f s x β g s x β deriv_within (Ξ» (y : π), f y - g y) s x = s x - s x

@[simp]
theorem deriv_sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f g : π β F} {x : π} :
f x β g x β deriv (Ξ» (y : π), f y - g y) x = x - x

theorem has_deriv_at_filter.is_O_sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {L : filter π} :
x L β asymptotics.is_O (Ξ» (x' : π), f x' - f x) (Ξ» (x' : π), x' - x) L

theorem has_deriv_at_filter.sub_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {L : filter π} (hf : x L) (c : F) :
has_deriv_at_filter (Ξ» (x : π), f x - c) f' x L

theorem has_deriv_within_at.sub_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} (hf : s x) (c : F) :
has_deriv_within_at (Ξ» (x : π), f x - c) f' s x

theorem has_deriv_at.sub_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} (hf : f' x) (c : F) :
has_deriv_at (Ξ» (x : π), f x - c) f' x

theorem deriv_within_sub_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} (hxs : s x) (hf : f s x) (c : F) :
deriv_within (Ξ» (y : π), f y - c) s x = s x

theorem deriv_sub_const {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} (c : F) :
f x β deriv (Ξ» (y : π), f y - c) x = x

theorem has_deriv_at_filter.const_sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {L : filter π} (c : F) :
x L β has_deriv_at_filter (Ξ» (x : π), c - f x) (-f') x L

theorem has_deriv_within_at.const_sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} (c : F) :
s x β has_deriv_within_at (Ξ» (x : π), c - f x) (-f') s x

theorem has_deriv_at.const_sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} (c : F) :
f' x β has_deriv_at (Ξ» (x : π), c - f x) (-f') x

theorem deriv_within_const_sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} {s : set π} (hxs : s x) (c : F) :
f s x β deriv_within (Ξ» (y : π), c - f y) s x = - s x

theorem deriv_const_sub {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {x : π} (c : F) :
f x β deriv (Ξ» (y : π), c - f y) x = - x

### Continuity of a function admitting a derivative

theorem has_deriv_at_filter.tendsto_nhds {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {L : filter π} :
L β€ π x β x L β (π (f x))

theorem has_deriv_within_at.continuous_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} {s : set π} :
s x β x

theorem has_deriv_at.continuous_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {f : π β F} {f' : F} {x : π} :
f' x β

### Derivative of the cartesian product of two functions

theorem has_deriv_at_filter.prod {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {fβ : π β F} {fβ' : F} {x : π} {L : filter π} {G : Type w} [normed_group G] [normed_space π G] {fβ : π β G} {fβ' : G} :
fβ' x L β fβ' x L β has_deriv_at_filter (Ξ» (x : π), (fβ x, fβ x)) (fβ', fβ') x L

theorem has_deriv_within_at.prod {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {fβ : π β F} {fβ' : F} {x : π} {s : set π} {G : Type w} [normed_group G] [normed_space π G] {fβ : π β G} {fβ' : G} :
fβ' s x β fβ' s x β has_deriv_within_at (Ξ» (x : π), (fβ x, fβ x)) (fβ', fβ') s x

theorem has_deriv_at.prod {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {fβ : π β F} {fβ' : F} {x : π} {G : Type w} [normed_group G] [normed_space π G] {fβ : π β G} {fβ' : G} :
has_deriv_at fβ fβ' x β has_deriv_at fβ fβ' x β has_deriv_at (Ξ» (x : π), (fβ x, fβ x)) (fβ', fβ') x

### 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 has_deriv_at_filter.scomp {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {g : π β F} {g' : F} (x : π) {L : filter π} {h : π β π} {h' : π} :
(h x) L) β x L β has_deriv_at_filter (g β h) (h' β’ g') x L

theorem has_deriv_within_at.scomp {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {g : π β F} {g' : F} (x : π) {s : set π} {h : π β π} {h' : π} {t : set π} :
t (h x) β s x β s β h β»ΒΉ' t β has_deriv_within_at (g β h) (h' β’ g') s x

theorem has_deriv_at.scomp {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {g : π β F} {g' : F} (x : π) {h : π β π} {h' : π} :
g' (h x) β h' x β has_deriv_at (g β h) (h' β’ g') x

The chain rule.

theorem has_strict_deriv_at.scomp {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {g : π β F} {g' : F} (x : π) {h : π β π} {h' : π} :
(h x) β x β has_strict_deriv_at (g β h) (h' β’ g') x

theorem has_deriv_at.scomp_has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {g : π β F} {g' : F} (x : π) {s : set π} {h : π β π} {h' : π} :
g' (h x) β s x β has_deriv_within_at (g β h) (h' β’ g') s x

theorem deriv_within.scomp {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {g : π β F} (x : π) {s t : set π} {h : π β π} :
g t (h x) β h s x β s β h β»ΒΉ' t β s x β deriv_within (g β h) s x = s x β’ t (h x)

theorem deriv.scomp {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {g : π β F} (x : π) {h : π β π} :
g (h x) β h x β deriv (g β h) x = x β’ (h x)

### Derivative of the composition of two scalar functions

theorem has_deriv_at_filter.comp {π : Type u} [nondiscrete_normed_field π] (x : π) {L : filter π} {hβ hβ : π β π} {hβ' hβ' : π} :
hβ' (hβ x) (filter.map hβ L) β hβ' x L β has_deriv_at_filter (hβ β hβ) (hβ' * hβ') x L

theorem has_deriv_within_at.comp {π : Type u} [nondiscrete_normed_field π] (x : π) {s : set π} {hβ hβ : π β π} {hβ' hβ' : π} {t : set π} :
hβ' t (hβ x) β hβ' s x β s β hβ β»ΒΉ' t β has_deriv_within_at (hβ β hβ) (hβ' * hβ') s x

theorem has_deriv_at.comp {π : Type u} [nondiscrete_normed_field π] (x : π) {hβ hβ : π β π} {hβ' hβ' : π} :
has_deriv_at hβ hβ' (hβ x) β has_deriv_at hβ hβ' x β has_deriv_at (hβ β hβ) (hβ' * hβ') x

The chain rule.

theorem has_strict_deriv_at.comp {π : Type u} [nondiscrete_normed_field π] (x : π) {hβ hβ : π β π} {hβ' hβ' : π} :
hβ' (hβ x) β hβ' x β has_strict_deriv_at (hβ β hβ) (hβ' * hβ') x

theorem has_deriv_at.comp_has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] (x : π) {s : set π} {hβ hβ : π β π} {hβ' hβ' : π} :
has_deriv_at hβ hβ' (hβ x) β hβ' s x β has_deriv_within_at (hβ β hβ) (hβ' * hβ') s x

theorem deriv_within.comp {π : Type u} [nondiscrete_normed_field π] (x : π) {s t : set π} {hβ hβ : π β π} :
hβ t (hβ x) β hβ s x β s β hβ β»ΒΉ' t β s x β deriv_within (hβ β hβ) s x = (deriv_within hβ t (hβ x)) * deriv_within hβ s x

theorem deriv.comp {π : Type u} [nondiscrete_normed_field π] (x : π) {hβ hβ : π β π} :
hβ (hβ x) β hβ x β deriv (hβ β hβ) x = (deriv hβ (hβ x)) * deriv hβ x

theorem has_deriv_at_filter.iterate {π : Type u} [nondiscrete_normed_field π] (x : π) {L : filter π} {f : π β π} {f' : π} (hf : x L) (hL : L) (hx : f x = x) (n : β) :
(f' ^ n) x L

theorem has_deriv_at.iterate {π : Type u} [nondiscrete_normed_field π] (x : π) {f : π β π} {f' : π} (hf : f' x) (hx : f x = x) (n : β) :
(f' ^ n) x

theorem has_deriv_within_at.iterate {π : Type u} [nondiscrete_normed_field π] (x : π) {s : set π} {f : π β π} {f' : π} (hf : s x) (hx : f x = x) (hs : s s) (n : β) :
(f' ^ n) s x

theorem has_strict_deriv_at.iterate {π : Type u} [nondiscrete_normed_field π] (x : π) {f : π β π} {f' : π} (hf : x) (hx : f x = x) (n : β) :
(f' ^ n) x

### Derivative of the composition of a function between vector spaces and of a function defined on π

theorem has_fderiv_within_at.comp_has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {E : Type w} [normed_group E] [normed_space π E] {f : π β F} {f' : F} (x : π) {s : set π} {l : F β E} {l' : F βL[π] E} {t : set F} :
t (f x) β s x β s β f β»ΒΉ' t β has_deriv_within_at (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 has_fderiv_at.comp_has_deriv_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {E : Type w} [normed_group E] [normed_space π E] {f : π β F} {f' : F} (x : π) {l : F β E} {l' : F βL[π] E} :
l' (f x) β f' x β has_deriv_at (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 has_fderiv_at.comp_has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {E : Type w} [normed_group E] [normed_space π E] {f : π β F} {f' : F} (x : π) {s : set π} {l : F β E} {l' : F βL[π] E} :
l' (f x) β s x β has_deriv_within_at (l β f) (βl' f') s x

theorem fderiv_within.comp_deriv_within {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {E : Type w} [normed_group E] [normed_space π E] {f : π β F} (x : π) {s : set π} {l : F β E} {t : set F} :
l t (f x) β f s x β s β f β»ΒΉ' t β s x β deriv_within (l β f) s x = β(fderiv_within π l t (f x)) s x)

theorem fderiv.comp_deriv {π : Type u} [nondiscrete_normed_field π] {F : Type v} [normed_group F] [normed_space π F] {E : Type w} [normed_group E] [normed_space π E] {f : π β F} (x : π) {l : F β E} :
l (f x) β f x β deriv (l β f) x = β(fderiv π l (f x)) (deriv f x)

### Derivative of the multiplication of two scalar functions

theorem has_deriv_within_at.mul {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c d : π β π} {c' d' : π} :
s x β s x β has_deriv_within_at (Ξ» (y : π), (c y) * d y) (c' * d x + (c x) * d') s x

theorem has_deriv_at.mul {π : Type u} [nondiscrete_normed_field π] {x : π} {c d : π β π} {c' d' : π} :
c' x β d' x β has_deriv_at (Ξ» (y : π), (c y) * d y) (c' * d x + (c x) * d') x

theorem has_strict_deriv_at.mul {π : Type u} [nondiscrete_normed_field π] {x : π} {c d : π β π} {c' d' : π} :
x β x β has_strict_deriv_at (Ξ» (y : π), (c y) * d y) (c' * d x + (c x) * d') x

theorem deriv_within_mul {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c d : π β π} :
s x β c s x β d s x β deriv_within (Ξ» (y : π), (c y) * d y) s x = s x) * d x + (c x) * s x

@[simp]
theorem deriv_mul {π : Type u} [nondiscrete_normed_field π] {x : π} {c d : π β π} :
c x β d x β deriv (Ξ» (y : π), (c y) * d y) x = (deriv c x) * d x + (c x) * x

theorem has_deriv_within_at.mul_const {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c : π β π} {c' : π} (hc : s x) (d : π) :
has_deriv_within_at (Ξ» (y : π), (c y) * d) (c' * d) s x

theorem has_deriv_at.mul_const {π : Type u} [nondiscrete_normed_field π] {x : π} {c : π β π} {c' : π} (hc : c' x) (d : π) :
has_deriv_at (Ξ» (y : π), (c y) * d) (c' * d) x

theorem deriv_within_mul_const {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c : π β π} (hxs : s x) (hc : c s x) (d : π) :
deriv_within (Ξ» (y : π), (c y) * d) s x = s x) * d

theorem deriv_mul_const {π : Type u} [nondiscrete_normed_field π] {x : π} {c : π β π} (hc : c x) (d : π) :
deriv (Ξ» (y : π), (c y) * d) x = (deriv c x) * d

theorem has_deriv_within_at.const_mul {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {d : π β π} {d' : π} (c : π) :
s x β has_deriv_within_at (Ξ» (y : π), c * d y) (c * d') s x

theorem has_deriv_at.const_mul {π : Type u} [nondiscrete_normed_field π] {x : π} {d : π β π} {d' : π} (c : π) :
d' x β has_deriv_at (Ξ» (y : π), c * d y) (c * d') x

theorem deriv_within_const_mul {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {d : π β π} (hxs : s x) (c : π) :
d s x β deriv_within (Ξ» (y : π), c * d y) s x = c * s x

theorem deriv_const_mul {π : Type u} [nondiscrete_normed_field π] {x : π} {d : π β π} (c : π) :
d x β deriv (Ξ» (y : π), c * d y) x = c * x

### Derivative of x β¦ xβ»ΒΉ

theorem has_strict_deriv_at_inv {π : Type u} [nondiscrete_normed_field π] {x : π} :
x β  0 β x

theorem has_deriv_at_inv {π : Type u} [nondiscrete_normed_field π] {x : π} :
x β  0 β has_deriv_at (Ξ» (y : π), yβ»ΒΉ) (-(x ^ 2)β»ΒΉ) x

theorem has_deriv_within_at_inv {π : Type u} [nondiscrete_normed_field π] {x : π} (x_ne_zero : x β  0) (s : set π) :
has_deriv_within_at (Ξ» (x : π), xβ»ΒΉ) (-(x ^ 2)β»ΒΉ) s x

theorem differentiable_at_inv {π : Type u} [nondiscrete_normed_field π] {x : π} :
x β  0 β (Ξ» (x : π), xβ»ΒΉ) x

theorem differentiable_within_at_inv {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} :
x β  0 β (Ξ» (x : π), xβ»ΒΉ) s x

theorem differentiable_on_inv {π : Type u} [nondiscrete_normed_field π] :
(Ξ» (x : π), xβ»ΒΉ) {x : π | x β  0}

theorem deriv_inv {π : Type u} [nondiscrete_normed_field π] {x : π} :
x β  0 β deriv (Ξ» (x : π), xβ»ΒΉ) x = -(x ^ 2)β»ΒΉ

theorem deriv_within_inv {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} :
x β  0 β s x β deriv_within (Ξ» (x : π), xβ»ΒΉ) s x = -(x ^ 2)β»ΒΉ

theorem has_fderiv_at_inv {π : Type u} [nondiscrete_normed_field π] {x : π} :
x β  0 β has_fderiv_at (Ξ» (x : π), xβ»ΒΉ) (1.smul_right (-(x ^ 2)β»ΒΉ)) x

theorem has_fderiv_within_at_inv {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} :
x β  0 β has_fderiv_within_at (Ξ» (x : π), xβ»ΒΉ) (1.smul_right (-(x ^ 2)β»ΒΉ)) s x

theorem fderiv_inv {π : Type u} [nondiscrete_normed_field π] {x : π} :
x β  0 β fderiv π (Ξ» (x : π), xβ»ΒΉ) x = 1.smul_right (-(x ^ 2)β»ΒΉ)

theorem fderiv_within_inv {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} :
x β  0 β s x β fderiv_within π (Ξ» (x : π), xβ»ΒΉ) s x = 1.smul_right (-(x ^ 2)β»ΒΉ)

theorem has_deriv_within_at.inv {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c : π β π} {c' : π} :
s x β c x β  0 β has_deriv_within_at (Ξ» (y : π), (c y)β»ΒΉ) (-c' / c x ^ 2) s x

theorem has_deriv_at.inv {π : Type u} [nondiscrete_normed_field π] {x : π} {c : π β π} {c' : π} :
c' x β c x β  0 β has_deriv_at (Ξ» (y : π), (c y)β»ΒΉ) (-c' / c x ^ 2) x

theorem differentiable_within_at.inv {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c : π β π} :
c s x β c x β  0 β (Ξ» (x : π), (c x)β»ΒΉ) s x

@[simp]
theorem differentiable_at.inv {π : Type u} [nondiscrete_normed_field π] {x : π} {c : π β π} :
c x β c x β  0 β (Ξ» (x : π), (c x)β»ΒΉ) x

theorem differentiable_on.inv {π : Type u} [nondiscrete_normed_field π] {s : set π} {c : π β π} :
c s β (β (x : π), x β s β c x β  0) β (Ξ» (x : π), (c x)β»ΒΉ) s

@[simp]
theorem differentiable.inv {π : Type u} [nondiscrete_normed_field π] {c : π β π} :
differentiable π c β (β (x : π), c x β  0) β differentiable π (Ξ» (x : π), (c x)β»ΒΉ)

theorem deriv_within_inv' {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c : π β π} :
c s x β c x β  0 β s x β deriv_within (Ξ» (x : π), (c x)β»ΒΉ) s x = - s x / c x ^ 2

@[simp]
theorem deriv_inv' {π : Type u} [nondiscrete_normed_field π] {x : π} {c : π β π} :
c x β c x β  0 β deriv (Ξ» (x : π), (c x)β»ΒΉ) x = - x / c x ^ 2

### Derivative of x β¦ c x / d x

theorem has_deriv_within_at.div {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c d : π β π} {c' d' : π} :
s x β s x β d x β  0 β has_deriv_within_at (Ξ» (y : π), c y / d y) ((c' * d x - (c x) * d') / d x ^ 2) s x

theorem has_deriv_at.div {π : Type u} [nondiscrete_normed_field π] {x : π} {c d : π β π} {c' d' : π} :
c' x β d' x β d x β  0 β has_deriv_at (Ξ» (y : π), c y / d y) ((c' * d x - (c x) * d') / d x ^ 2) x

theorem differentiable_within_at.div {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c d : π β π} :
c s x β d s x β d x β  0 β (Ξ» (x : π), c x / d x) s x

@[simp]
theorem differentiable_at.div {π : Type u} [nondiscrete_normed_field π] {x : π} {c d : π β π} :
c x β d x β d x β  0 β (Ξ» (x : π), c x / d x) x

theorem differentiable_on.div {π : Type u} [nondiscrete_normed_field π] {s : set π} {c d : π β π} :
c s β d s β (β (x : π), x β s β d x β  0) β (Ξ» (x : π), c x / d x) s

@[simp]
theorem differentiable.div {π : Type u} [nondiscrete_normed_field π] {c d : π β π} :
differentiable π c β differentiable π d β (β (x : π), d x β  0) β differentiable π (Ξ» (x : π), c x / d x)

theorem deriv_within_div {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c d : π β π} :
c s x β d s x β d x β  0 β s x β deriv_within (Ξ» (x : π), c x / d x) s x = ((deriv_within c s x) * d x - (c x) * s x) / d x ^ 2

@[simp]
theorem deriv_div {π : Type u} [nondiscrete_normed_field π] {x : π} {c d : π β π} :
c x β d x β d x β  0 β deriv (Ξ» (x : π), c x / d x) x = ((deriv c x) * d x - (c x) * x) / d x ^ 2

theorem differentiable_within_at.div_const {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c : π β π} (hc : c s x) {d : π} :
(Ξ» (x : π), c x / d) s x

@[simp]
theorem differentiable_at.div_const {π : Type u} [nondiscrete_normed_field π] {x : π} {c : π β π} (hc : c x) {d : π} :
(Ξ» (x : π), c x / d) x

theorem differentiable_on.div_const {π : Type u} [nondiscrete_normed_field π] {s : set π} {c : π β π} (hc : c s) {d : π} :
(Ξ» (x : π), c x / d) s

@[simp]
theorem differentiable.div_const {π : Type u} [nondiscrete_normed_field π] {c : π β π} (hc : differentiable π c) {d : π} :
differentiable π (Ξ» (x : π), c x / d)

theorem deriv_within_div_const {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c : π β π} (hc : c s x) {d : π} :
s x β deriv_within (Ξ» (x : π), c x / d) s x = s x / d

@[simp]
theorem deriv_div_const {π : Type u} [nondiscrete_normed_field π] {x : π} {c : π β π} (hc : c x) {d : π} :
deriv (Ξ» (x : π), c x / d) x = x / d

theorem has_strict_deriv_at.has_strict_fderiv_at_equiv {π : Type u} [nondiscrete_normed_field π] {f : π β π} {f' x : π} (hf : x) (hf' : f' β  0) :
β (units.mk0 f' hf')) x

theorem has_deriv_at.has_fderiv_at_equiv {π : Type u} [nondiscrete_normed_field π] {f : π β π} {f' x : π} (hf : f' x) (hf' : f' β  0) :
β (units.mk0 f' hf')) x

theorem has_strict_deriv_at.of_local_left_inverse {π : Type u} [nondiscrete_normed_field π] {f g : π β π} {f' a : π} :
β (g a) β f' β  0 β (βαΆ  (y : π) in π a, f (g y) = y) β a

If f (g y) = y for y in some neighborhood of a, g is continuous at a, and f has an invertible derivative f' at g a in the strict sense, then g has the derivative f'β»ΒΉ at a in the strict sense.

This is one of the easy parts of the inverse function theorem: it assumes that we already have an inverse function.

theorem has_deriv_at.of_local_left_inverse {π : Type u} [nondiscrete_normed_field π] {f g : π β π} {f' a : π} :
β f' (g a) β f' β  0 β (βαΆ  (y : π) in π a, f (g y) = y) β a

If f (g y) = y for y in some neighborhood of a, g is continuous at a, and f has an invertible derivative f' at g a, then g has the derivative f'β»ΒΉ at a.

This is one of the easy parts of the inverse function theorem: it assumes that we already have an inverse function.

### Derivative of a polynomial

theorem polynomial.has_strict_deriv_at {π : Type u} [nondiscrete_normed_field π] (p : polynomial π) (x : π) :
has_strict_deriv_at (Ξ» (x : π), p) x

The derivative (in the analysis sense) of a polynomial p is given by p.derivative.

theorem polynomial.has_deriv_at {π : Type u} [nondiscrete_normed_field π] (p : polynomial π) (x : π) :
has_deriv_at (Ξ» (x : π), p) x

The derivative (in the analysis sense) of a polynomial p is given by p.derivative.

theorem polynomial.has_deriv_within_at {π : Type u} [nondiscrete_normed_field π] (p : polynomial π) (x : π) (s : set π) :
has_deriv_within_at (Ξ» (x : π), p) s x

theorem polynomial.differentiable_at {π : Type u} [nondiscrete_normed_field π] {x : π} (p : polynomial π) :
(Ξ» (x : π), p) x

theorem polynomial.differentiable_within_at {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} (p : polynomial π) :
(Ξ» (x : π), p) s x

theorem polynomial.differentiable {π : Type u} [nondiscrete_normed_field π] (p : polynomial π) :
differentiable π (Ξ» (x : π), p)

theorem polynomial.differentiable_on {π : Type u} [nondiscrete_normed_field π] {s : set π} (p : polynomial π) :
(Ξ» (x : π), p) s

@[simp]
theorem polynomial.deriv {π : Type u} [nondiscrete_normed_field π] {x : π} (p : polynomial π) :
deriv (Ξ» (x : π), p) x =

theorem polynomial.deriv_within {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} (p : polynomial π) :
s x β deriv_within (Ξ» (x : π), p) s x =

theorem polynomial.continuous {π : Type u} [nondiscrete_normed_field π] (p : polynomial π) :
continuous (Ξ» (x : π), p)

theorem polynomial.continuous_on {π : Type u} [nondiscrete_normed_field π] {s : set π} (p : polynomial π) :
continuous_on (Ξ» (x : π), p) s

theorem polynomial.continuous_at {π : Type u} [nondiscrete_normed_field π] {x : π} (p : polynomial π) :
continuous_at (Ξ» (x : π), p) x

theorem polynomial.continuous_within_at {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} (p : polynomial π) :
continuous_within_at (Ξ» (x : π), p) s x

theorem polynomial.has_fderiv_at {π : Type u} [nondiscrete_normed_field π] (p : polynomial π) (x : π) :
has_fderiv_at (Ξ» (x : π), p) (1.smul_right p.derivative)) x

theorem polynomial.has_fderiv_within_at {π : Type u} [nondiscrete_normed_field π] {s : set π} (p : polynomial π) (x : π) :
has_fderiv_within_at (Ξ» (x : π), p) (1.smul_right p.derivative)) s x

@[simp]
theorem polynomial.fderiv {π : Type u} [nondiscrete_normed_field π] {x : π} (p : polynomial π) :
fderiv π (Ξ» (x : π), p) x = 1.smul_right

theorem polynomial.fderiv_within {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} (p : polynomial π) :
s x β fderiv_within π (Ξ» (x : π), p) s x = 1.smul_right

### Derivative of x β¦ x^n for n : β

theorem has_strict_deriv_at_pow {π : Type u} [nondiscrete_normed_field π] (n : β) (x : π) :
has_strict_deriv_at (Ξ» (x : π), x ^ n) ((βn) * x ^ (n - 1)) x

theorem has_deriv_at_pow {π : Type u} [nondiscrete_normed_field π] (n : β) (x : π) :
has_deriv_at (Ξ» (x : π), x ^ n) ((βn) * x ^ (n - 1)) x

theorem has_deriv_within_at_pow {π : Type u} [nondiscrete_normed_field π] (n : β) (x : π) (s : set π) :
has_deriv_within_at (Ξ» (x : π), x ^ n) ((βn) * x ^ (n - 1)) s x

theorem differentiable_at_pow {π : Type u} [nondiscrete_normed_field π] {x : π} {n : β} :
(Ξ» (x : π), x ^ n) x

theorem differentiable_within_at_pow {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {n : β} :
(Ξ» (x : π), x ^ n) s x

theorem differentiable_pow {π : Type u} [nondiscrete_normed_field π] {n : β} :
differentiable π (Ξ» (x : π), x ^ n)

theorem differentiable_on_pow {π : Type u} [nondiscrete_normed_field π] {s : set π} {n : β} :
(Ξ» (x : π), x ^ n) s

theorem deriv_pow {π : Type u} [nondiscrete_normed_field π] {x : π} {n : β} :
deriv (Ξ» (x : π), x ^ n) x = (βn) * x ^ (n - 1)

@[simp]
theorem deriv_pow' {π : Type u} [nondiscrete_normed_field π] {n : β} :
deriv (Ξ» (x : π), x ^ n) = Ξ» (x : π), (βn) * x ^ (n - 1)

theorem deriv_within_pow {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {n : β} :
s x β deriv_within (Ξ» (x : π), x ^ n) s x = (βn) * x ^ (n - 1)

theorem iter_deriv_pow' {π : Type u} [nondiscrete_normed_field π] {n k : β} :
deriv^[k] (Ξ» (x : π), x ^ n) = Ξ» (x : π), (ββ (i : β) in , (n - i)) * x ^ (n - k)

theorem iter_deriv_pow {π : Type u} [nondiscrete_normed_field π] {x : π} {n k : β} :
deriv^[k] (Ξ» (x : π), x ^ n) x = (ββ (i : β) in , (n - i)) * x ^ (n - k)

theorem has_deriv_within_at.pow {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c : π β π} {c' : π} {n : β} :
s x β has_deriv_within_at (Ξ» (y : π), c y ^ n) (((βn) * c x ^ (n - 1)) * c') s x

theorem has_deriv_at.pow {π : Type u} [nondiscrete_normed_field π] {x : π} {c : π β π} {c' : π} {n : β} :
c' x β has_deriv_at (Ξ» (y : π), c y ^ n) (((βn) * c x ^ (n - 1)) * c') x

theorem differentiable_within_at.pow {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c : π β π} {n : β} :
c s x β (Ξ» (x : π), c x ^ n) s x

@[simp]
theorem differentiable_at.pow {π : Type u} [nondiscrete_normed_field π] {x : π} {c : π β π} {n : β} :
c x β (Ξ» (x : π), c x ^ n) x

theorem differentiable_on.pow {π : Type u} [nondiscrete_normed_field π] {s : set π} {c : π β π} {n : β} :
c s β (Ξ» (x : π), c x ^ n) s

@[simp]
theorem differentiable.pow {π : Type u} [nondiscrete_normed_field π] {c : π β π} {n : β} :
differentiable π c β differentiable π (Ξ» (x : π), c x ^ n)

theorem deriv_within_pow' {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {c : π β π} {n : β} :
c s x β s x β deriv_within (Ξ» (x : π), c x ^ n) s x = ((βn) * c x ^ (n - 1)) * s x

@[simp]
theorem deriv_pow'' {π : Type u} [nondiscrete_normed_field π] {x : π} {c : π β π} {n : β} :
c x β deriv (Ξ» (x : π), c x ^ n) x = ((βn) * c x ^ (n - 1)) * x

### Derivative of x β¦ x^m for m : β€

theorem has_strict_deriv_at_fpow {π : Type u} [nondiscrete_normed_field π] {x : π} (m : β€) :
x β  0 β has_strict_deriv_at (Ξ» (x : π), x ^ m) ((βm) * x ^ (m - 1)) x

theorem has_deriv_at_fpow {π : Type u} [nondiscrete_normed_field π] {x : π} (m : β€) :
x β  0 β has_deriv_at (Ξ» (x : π), x ^ m) ((βm) * x ^ (m - 1)) x

theorem has_deriv_within_at_fpow {π : Type u} [nondiscrete_normed_field π] {x : π} (m : β€) (hx : x β  0) (s : set π) :
has_deriv_within_at (Ξ» (x : π), x ^ m) ((βm) * x ^ (m - 1)) s x

theorem differentiable_at_fpow {π : Type u} [nondiscrete_normed_field π] {x : π} {m : β€} :
x β  0 β (Ξ» (x : π), x ^ m) x

theorem differentiable_within_at_fpow {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {m : β€} :
x β  0 β (Ξ» (x : π), x ^ m) s x

theorem differentiable_on_fpow {π : Type u} [nondiscrete_normed_field π] {s : set π} {m : β€} :
0 β s β (Ξ» (x : π), x ^ m) s

theorem deriv_fpow {π : Type u} [nondiscrete_normed_field π] {x : π} {m : β€} :
x β  0 β deriv (Ξ» (x : π), x ^ m) x = (βm) * x ^ (m - 1)

theorem deriv_within_fpow {π : Type u} [nondiscrete_normed_field π] {x : π} {s : set π} {m : β€} :
s x β x β  0 β deriv_within (Ξ» (x : π), x ^ m) s x = (βm) * x ^ (m - 1)

theorem iter_deriv_fpow {π : Type u} [nondiscrete_normed_field π] {x : π} {m : β€} {k : β} :
x β  0 β deriv^[k] (Ξ» (x : π), x ^ m) x = (ββ (i : β) in , (m - βi)) * x ^ (m - βk)

### Upper estimates on liminf and limsup

theorem has_deriv_within_at.limsup_slope_le {f : β β β} {f' : β} {s : set β} {x r : β} :
s x β f' < r β (βαΆ  (z : β) in π[s \ {x}] x, (z - x)β»ΒΉ * (f z - f x) < r)

theorem has_deriv_within_at.limsup_slope_le' {f : β β β} {f' : β} {s : set β} {x r : β} :
s x β x β s β f' < r β (βαΆ  (z : β) in π[s] x, (z - x)β»ΒΉ * (f z - f x) < r)

theorem has_deriv_within_at.liminf_right_slope_le {f : β β β} {f' x r : β} :
(set.Ioi x) x β f' < r β (βαΆ  (z : β) in , (z - x)β»ΒΉ * (f z - f x) < r)

theorem has_deriv_within_at.limsup_norm_slope_le {E : Type u} [normed_group E] [ E] {f : β β E} {f' : E} {s : set β} {x r : β} :
s x β β₯f'β₯ < r β (βαΆ  (z : β) in π[s] x, β₯z - xβ₯β»ΒΉ * β₯f z - f xβ₯ < r)

If f has derivative f' within s at x, then for any r > β₯f'β₯ the ratio β₯f z - f xβ₯ / β₯z - xβ₯ is less than r in some neighborhood of x within s. In other words, the limit superior of this ratio as z tends to x along s is less than or equal to β₯f'β₯.

theorem has_deriv_within_at.limsup_slope_norm_le {E : Type u} [normed_group E] [ E] {f : β β E} {f' : E} {s : set β} {x r : β} :
s x β β₯f'β₯ < r β (βαΆ  (z : β) in π[s] x, β₯z - xβ₯β»ΒΉ * (β₯f zβ₯ - β₯f xβ₯) < r)

If f has derivative f' within s at x, then for any r > β₯f'β₯ the ratio (β₯f zβ₯ - β₯f xβ₯) / β₯z - xβ₯ is less than r in some neighborhood of x within s. In other words, the limit superior of this ratio as z tends to x along s is less than or equal to β₯f'β₯.

This lemma is a weaker version of has_deriv_within_at.limsup_norm_slope_le where β₯f zβ₯ - β₯f xβ₯ is replaced by β₯f z - f xβ₯.

theorem has_deriv_within_at.liminf_right_norm_slope_le {E : Type u} [normed_group E] [ E] {f : β β E} {f' : E} {x r : β} :
(set.Ioi x) x β β₯f'β₯ < r β (βαΆ  (z : β) in , β₯z - xβ₯β»ΒΉ * β₯f z - f xβ₯ < r)

If f has derivative f' within (x, +β) at x, then for any r > β₯f'β₯ the ratio β₯f z - f xβ₯ / β₯z - xβ₯ is frequently less than r as z β x+0. In other words, the limit inferior of this ratio as z tends to x+0 is less than or equal to β₯f'β₯. See also has_deriv_within_at.limsup_norm_slope_le for a stronger version using limit superior and any set s.

theorem has_deriv_within_at.liminf_right_slope_norm_le {E : Type u} [normed_group E] [ E] {f : β β E} {f' : E} {x r : β} :
(set.Ioi x) x β β₯f'β₯ < r β (βαΆ  (z : β) in , (z - x)β»ΒΉ * (β₯f zβ₯ - β₯f xβ₯) < r)

If f has derivative f' within (x, +β) at x, then for any r > β₯f'β₯ the ratio (β₯f zβ₯ - β₯f xβ₯) / (z - x) is frequently less than r as z β x+0. In other words, the limit inferior of this ratio as z tends to x+0 is less than or equal to β₯f'β₯.