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:
HasDerivAtFilter f f' x L
states that the functionf
has the derivativef'
at the pointx
asx
goes along the filterL
.HasDerivWithinAt f f' s x
states that the functionf
has the derivativef'
at the pointx
within the subsets
.HasDerivAt f f' x
states that the functionf
has the derivativef'
at the pointx
.HasStrictDerivAt f f' x
states that the functionf
has the derivativef'
at the pointx
in the sense of strict differentiability, i.e.,f y - f z = (y - z) β’ f' + o (y - z)
asy, z β x
.
For the last two notions we also define a functional version:
derivWithin f s x
is a derivative off
atx
withins
. If the derivative does not exist, thenderivWithin f s x
equals zero.deriv f x
is a derivative off
atx
. If the derivative does not exist, thenderiv f x
equals zero.
The theorems fderivWithin_derivWithin
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 (in
Linear.lean
) - addition (in
Add.lean
) - sum of finitely many functions (in
Add.lean
) - negation (in
Add.lean
) - subtraction (in
Add.lean
) - star (in
Star.lean
) - multiplication of two functions in
π β π
(inMul.lean
) - multiplication of a function in
π β π
and of a function inπ β E
(inMul.lean
) - powers of a function (in
Pow.lean
andZPow.lean
) - inverse
x β xβ»ΒΉ
(inInv.lean
) - division (in
Inv.lean
) - composition of a function in
π β F
with a function inπ β π
(inComp.lean
) - composition of a function in
F β E
with a function inπ β F
(inComp.lean
) - inverse function (assuming that it exists; the inverse function theorem is in
Inverse.lean
) - polynomials (in
Polynomial.lean
)
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 HasDerivAt
'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 (fun x β¦ cos (sin x) * exp x) x = (cos(sin(x))-sin(sin(x))*cos(x))*exp(x) := by
simp; ring
The relationship between the derivative of a function and its definition from a standard
undergraduate course as the limit of the slope (f y - f x) / (y - x)
as y
tends to π[β ] x
is developed in the file Slope.lean
.
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/Basic.lean
. See the explanations there.
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
- HasDerivAtFilter f f' x L = HasFDerivAtFilter f (ContinuousLinearMap.smulRight 1 f') x L
Instances For
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
- HasDerivWithinAt f f' s x = HasDerivAtFilter f f' x (nhdsWithin x s)
Instances For
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
- HasDerivAt f f' x = HasDerivAtFilter f f' x (nhds x)
Instances For
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
- HasStrictDerivAt f f' x = HasStrictFDerivAt f (ContinuousLinearMap.smulRight 1 f') x
Instances For
Derivative of f
at the point x
within the set s
, if it exists. Zero otherwise.
If the derivative exists (i.e., β f', HasDerivWithinAt f f' s x
), then
f x' = f x + (x' - x) β’ derivWithin f s x + o(x' - x)
where x'
converges to x
inside s
.
Equations
- derivWithin f s x = (fderivWithin π f s x) 1
Instances For
Derivative of f
at the point x
, if it exists. Zero otherwise.
If the derivative exists (i.e., β f', HasDerivAt f f' x
), then
f x' = f x + (x' - x) β’ deriv f x + o(x' - x)
where x'
converges to x
.
Instances For
Expressing HasFDerivAtFilter f f' x L
in terms of HasDerivAtFilter
Expressing HasFDerivWithinAt f f' s x
in terms of HasDerivWithinAt
Expressing HasDerivWithinAt f f' s x
in terms of HasFDerivWithinAt
Expressing HasFDerivAt f f' x
in terms of HasDerivAt
Alias of the forward direction of hasStrictDerivAt_iff_hasStrictFDerivAt
.
Expressing HasDerivAt f f' x
in terms of HasFDerivAt
Alias of the forward direction of hasDerivAt_iff_hasFDerivAt
.
Expressing HasDerivAt f f' x
in terms of HasFDerivAt
Alias of the forward direction of hasDerivWithinAt_congr_set
.
Alias of the reverse direction of hasDerivWithinAt_Ioi_iff_Ici
.
Alias of the forward direction of hasDerivWithinAt_Ioi_iff_Ici
.
Alias of the reverse direction of hasDerivWithinAt_Iio_iff_Iic
.
Alias of the forward direction of hasDerivWithinAt_Iio_iff_Iic
.
Alias of the reverse direction of HasDerivWithinAt.Ioi_iff_Ioo
.
Alias of the forward direction of HasDerivWithinAt.Ioi_iff_Ioo
.
Alias of HasDerivWithinAt.mono_of_mem_nhdsWithin
.
Alias of derivWithin_of_mem_nhdsWithin
.
Congruence properties of derivatives #
Derivative of the identity #
Derivative of constant functions #
Continuity of a function admitting a derivative #
Converse to the mean value inequality: if f
is differentiable at xβ
and C
-lipschitz
on a neighborhood of xβ
then its derivative at xβ
has norm bounded by C
. This version
only assumes that βf x - f xββ β€ C * βx - xββ
in a neighborhood of x
.
Converse to the mean value inequality: if f
is differentiable at xβ
and C
-lipschitz
on a neighborhood of xβ
then its derivative at xβ
has norm bounded by C
.
Converse to the mean value inequality: if f
is differentiable at xβ
and C
-lipschitz
then its derivative at xβ
has norm bounded by C
.
Converse to the mean value inequality: if f
is C
-lipschitz
on a neighborhood of xβ
then its derivative at xβ
has norm bounded by C
. This version
only assumes that βf x - f xββ β€ C * βx - xββ
in a neighborhood of x
.
Converse to the mean value inequality: if f
is C
-lipschitz
on a neighborhood of xβ
then its derivative at xβ
has norm bounded by C
.
Version using deriv
.
Converse to the mean value inequality: if f
is C
-lipschitz then
its derivative at xβ
has norm bounded by C
.
Version using deriv
.