Module docstring
{"# 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 Lstates that the functionfhas the derivativef'at the pointxasxgoes along the filterL.HasDerivWithinAt f f' s xstates that the functionfhas the derivativef'at the pointxwithin the subsets.HasDerivAt f f' xstates that the functionfhas the derivativef'at the pointx.HasStrictDerivAt f f' xstates that the functionfhas the derivativef'at the pointxin 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 xis a derivative offatxwithins. If the derivative does not exist, thenderivWithin f s xequals zero.deriv f xis a derivative offatx. If the derivative does not exist, thenderiv f xequals 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 π β π (in Mul.lean)
- multiplication of a function in π β π and of a function in π β E (in Mul.lean)
- powers of a function (in Pow.lean and ZPow.lean)
- inverse x β xβ»ΒΉ (in Inv.lean)
- division (in Inv.lean)
- composition of a function in π β F with a function in π β π (in Comp.lean)
- composition of a function in F β E with a function in π β F (in Comp.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,
lean
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.
","### Congruence properties of derivatives ","### Derivative of the identity ","### Derivative of constant functions
This include the constant functions 0, 1, Nat.cast n, Int.cast z, and other numerals.
","### Continuity of a function admitting a derivative "}