5.1. First examples
Mathlib has a theory of differential calculus. Given functions:
variable (f : ℝ → ℝ) (g : ℝ → ℝ)
Mathlib has tools as follows:
-
Differentiable ℝ fasks whetherfis differentiable everywhere. -
∀ x, HasDerivAt f (g x) xasks whethergis the derivative offeverywhere. -
deriv fis the derivative off(or zero if it is not differentiable).
We note in passing the following consistency:
example (h : Differentiable ℝ f) (x : ℝ) :
HasDerivAt f (deriv f x) x :=
(h x).hasDerivAt